diff options
Diffstat (limited to 'deps/npm/node_modules/lodash/chain/wrapperPlant.js')
-rw-r--r-- | deps/npm/node_modules/lodash/chain/wrapperPlant.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/deps/npm/node_modules/lodash/chain/wrapperPlant.js b/deps/npm/node_modules/lodash/chain/wrapperPlant.js deleted file mode 100644 index 234fe41fec..0000000000 --- a/deps/npm/node_modules/lodash/chain/wrapperPlant.js +++ /dev/null @@ -1,45 +0,0 @@ -var baseLodash = require('../internal/baseLodash'), - wrapperClone = require('../internal/wrapperClone'); - -/** - * Creates a clone of the chained sequence planting `value` as the wrapped value. - * - * @name plant - * @memberOf _ - * @category Chain - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * var array = [1, 2]; - * var wrapped = _(array).map(function(value) { - * return Math.pow(value, 2); - * }); - * - * var other = [3, 4]; - * var otherWrapped = wrapped.plant(other); - * - * otherWrapped.value(); - * // => [9, 16] - * - * wrapped.value(); - * // => [1, 4] - */ -function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; -} - -module.exports = wrapperPlant; |