Files
lodash/wrapperChain.js
John-David Dalton 54e7baecc3 Bump to v4.0.0.
2016-01-12 00:17:29 -08:00

34 lines
635 B
JavaScript

import chain from './chain';
/**
* Enables explicit method chaining on the wrapper object.
*
* @name chain
* @memberOf _
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 }
* ];
*
* // without explicit chaining
* _(users).head();
* // => { 'user': 'barney', 'age': 36 }
*
* // with explicit chaining
* _(users)
* .chain()
* .head()
* .pick('user')
* .value();
* // => { 'user': 'barney' }
*/
function wrapperChain() {
return chain(this);
}
export default wrapperChain;