Sha256: 222b8e99ac3dda61e98e8d31994e45a4603720b6c1e6b453c2c14ec096bd81ba

Contents?: true

Size: 658 Bytes

Versions: 300

Compression:

Stored size: 658 Bytes

Contents

var LazyWrapper = require('./_LazyWrapper'),
    LodashWrapper = require('./_LodashWrapper'),
    copyArray = require('./_copyArray');

/**
 * Creates a clone of `wrapper`.
 *
 * @private
 * @param {Object} wrapper The wrapper to clone.
 * @returns {Object} Returns the cloned wrapper.
 */
function wrapperClone(wrapper) {
  if (wrapper instanceof LazyWrapper) {
    return wrapper.clone();
  }
  var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  result.__actions__ = copyArray(wrapper.__actions__);
  result.__index__  = wrapper.__index__;
  result.__values__ = wrapper.__values__;
  return result;
}

module.exports = wrapperClone;

Version data entries

300 entries across 276 versions & 32 rubygems

Version Path
govuk_publishing_components-16.19.0 node_modules/lodash/_wrapperClone.js
govuk_publishing_components-16.18.0 node_modules/lodash/_wrapperClone.js
govuk_publishing_components-16.17.0 node_modules/lodash/_wrapperClone.js
blsk-sevcore-0.0.2 blsk_old/bluesky-doc/bluesky-doc/node_modules/lodash/_wrapperClone.js
ela-4.1.6 node_modules/lodash/_wrapperClone.js
ela-4.1.5 node_modules/lodash/_wrapperClone.js
ela-4.1.4 node_modules/lodash/_wrapperClone.js
ela-4.1.3 node_modules/lodash/_wrapperClone.js
optimacms-0.4.3 spec/dummy/node_modules/lodash/_wrapperClone.js
optimacms-0.4.2 spec/dummy/node_modules/lodash/_wrapperClone.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/lodash/_wrapperClone.js
lux_assets-0.2.11 ./node_modules/lodash/_wrapperClone.js
lux_assets-0.2.9 ./node_modules/lodash/_wrapperClone.js
lux_assets-0.2.4 ./node_modules/lodash/_wrapperClone.js
lux_assets-0.2.2 ./node_modules/lodash/_wrapperClone.js
lux_assets-0.2.1 ./node_modules/lodash/_wrapperClone.js
ela-4.1.2 node_modules/lodash/_wrapperClone.js
sumomo-0.8.4 data/sumomo/api_modules/node_modules/lodash/_wrapperClone.js
ela-4.1.1 node_modules/lodash/_wrapperClone.js
ela-4.1.0 node_modules/lodash/_wrapperClone.js