Urara-Blog/node_modules/.pnpm-store/v3/files/94/63434702caeb98d9a5c609094afe3ec4ef46a86e841b5826fa598f80702655fc099b016c9d863d22790486f99b00050ac45488e7153d79be158a25943a9c90
2022-08-14 01:14:53 +08:00

33 lines
641 B
Text

var LodashWrapper = require('./_LodashWrapper');
/**
* Executes the chain sequence and returns the wrapped result.
*
* @name commit
* @memberOf _
* @since 3.2.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2];
* var wrapped = _(array).push(3);
*
* console.log(array);
* // => [1, 2]
*
* wrapped = wrapped.commit();
* console.log(array);
* // => [1, 2, 3]
*
* wrapped.last();
* // => 3
*
* console.log(array);
* // => [1, 2, 3]
*/
function wrapperCommit() {
return new LodashWrapper(this.value(), this.__chain__);
}
module.exports = wrapperCommit;