main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
704 bytes
|
Line | |
---|
1 | import chain from './chain.js';
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
|
---|
5 | *
|
---|
6 | * @name chain
|
---|
7 | * @memberOf _
|
---|
8 | * @since 0.1.0
|
---|
9 | * @category Seq
|
---|
10 | * @returns {Object} Returns the new `lodash` wrapper instance.
|
---|
11 | * @example
|
---|
12 | *
|
---|
13 | * var users = [
|
---|
14 | * { 'user': 'barney', 'age': 36 },
|
---|
15 | * { 'user': 'fred', 'age': 40 }
|
---|
16 | * ];
|
---|
17 | *
|
---|
18 | * // A sequence without explicit chaining.
|
---|
19 | * _(users).head();
|
---|
20 | * // => { 'user': 'barney', 'age': 36 }
|
---|
21 | *
|
---|
22 | * // A sequence with explicit chaining.
|
---|
23 | * _(users)
|
---|
24 | * .chain()
|
---|
25 | * .head()
|
---|
26 | * .pick('user')
|
---|
27 | * .value();
|
---|
28 | * // => { 'user': 'barney' }
|
---|
29 | */
|
---|
30 | function wrapperChain() {
|
---|
31 | return chain(this);
|
---|
32 | }
|
---|
33 |
|
---|
34 | export default wrapperChain;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.