mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Improve documentation for method chaining. [ci skip]
This commit is contained in:
committed by
John-David Dalton
parent
4510ada21e
commit
1be4adf365
23
lodash.js
23
lodash.js
@@ -1365,13 +1365,18 @@
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a `lodash` object which wraps `value` to enable implicit chaining.
|
||||
* Methods that operate on and return arrays, collections, and functions can
|
||||
* be chained together. Methods that retrieve a single value or may return a
|
||||
* primitive value will automatically end the chain returning the unwrapped
|
||||
* value. Explicit chaining may be enabled using `_.chain`. The execution of
|
||||
* chained methods is lazy, that is, execution is deferred until `_#value`
|
||||
* is implicitly or explicitly called.
|
||||
* Creates a `lodash` object which wraps `value` to enable implicit method
|
||||
* chaining. Methods that operate on and return arrays, collections, and
|
||||
* functions can be chained together. Methods that retrieve a single value or
|
||||
* may return a primitive value will automatically end the chain sequence and
|
||||
* return the unwrapped value. Otherwise, the value must be unwrapped with
|
||||
* `_#value`.
|
||||
*
|
||||
* Explicit chaining, which requires unwrapping with `_#value` in all cases,
|
||||
* may be enabled using `_.chain`.
|
||||
*
|
||||
* The execution of chained methods is lazy, that is, execution is deferred
|
||||
* until `_#value` is implicitly or explicitly called.
|
||||
*
|
||||
* Lazy evaluation allows several methods to support shortcut fusion. Shortcut
|
||||
* fusion is an optimization strategy which merge iteratee calls; this can help
|
||||
@@ -5751,8 +5756,8 @@
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a `lodash` object that wraps `value` with explicit method
|
||||
* chaining enabled.
|
||||
* Creates a `lodash` object that wraps `value` with explicit method chaining enabled.
|
||||
* The result of such method chaining must be unwrapped with `_#value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
|
||||
Reference in New Issue
Block a user