PHP 8.2.30
Preview: wrapperReverse.js Size: 1.10 KB
//opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js

var LazyWrapper = require('../internal/LazyWrapper'),
    LodashWrapper = require('../internal/LodashWrapper'),
    thru = require('./thru');

/**
 * Reverses the wrapped array so the first element becomes the last, the
 * second element becomes the second to last, and so on.
 *
 * **Note:** This method mutates the wrapped array.
 *
 * @name reverse
 * @memberOf _
 * @category Chain
 * @returns {Object} Returns the new reversed `lodash` wrapper instance.
 * @example
 *
 * var array = [1, 2, 3];
 *
 * _(array).reverse().value()
 * // => [3, 2, 1]
 *
 * console.log(array);
 * // => [3, 2, 1]
 */
function wrapperReverse() {
  var value = this.__wrapped__;

  var interceptor = function(value) {
    return value.reverse();
  };
  if (value instanceof LazyWrapper) {
    var wrapped = value;
    if (this.__actions__.length) {
      wrapped = new LazyWrapper(this);
    }
    wrapped = wrapped.reverse();
    wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
    return new LodashWrapper(wrapped, this.__chain__);
  }
  return this.thru(interceptor);
}

module.exports = wrapperReverse;

Directory Contents

Dirs: 0 × Files: 20

Name Size Perms Modified Actions
748 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
45 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
45 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
5.44 KB lrw-r--r-- 2021-09-28 11:28:34
Edit Download
44 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
46 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
44 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
793 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
627 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
44 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
47 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
44 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
44 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
638 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
638 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
931 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
981 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
1.10 KB lrw-r--r-- 2021-09-28 11:28:34
Edit Download
342 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download
457 B lrw-r--r-- 2021-09-28 11:28:34
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).