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
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
immosquare-cleaner-0.1.49 node_modules/lodash/_wrapperClone.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
immosquare-cleaner-0.1.48 node_modules/lodash/_wrapperClone.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.6 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/lodash/_wrapperClone.js