_.prototype.plant(value)
Creates a clone of the chain sequence planting value
as the wrapped value.
Since
3.2.0
Arguments
value
(*): The value to plant.
Returns
(Object): Returns the new lodash
wrapper instance.
Example
function square(n) {return n * n;}var wrapped = _([1, 2]).map(square);var other = wrapped.plant([3, 4]);other.value();// => [9, 16]wrapped.value();// => [1, 4]
当前内容版权归 lodash.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 lodash.com .