ohctechv3/.svn/pristine/db/dbb8deff05362c5e792aaa57dd8a7ce85ecdb1db.svn-base
2024-10-28 15:03:36 +05:30

34 lines
639 B
Plaintext

import LodashWrapper from './_LodashWrapper.js';
/**
* 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__);
}
export default wrapperCommit;