mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Tweak _.transform docs.
Former-commit-id: dc7100411a403be4cce6b3784e1dd81cc9423b76
This commit is contained in:
4
dist/lodash.compat.js
vendored
4
dist/lodash.compat.js
vendored
@@ -2392,9 +2392,9 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms an `object` to an new `accumulator` object which is the result
|
||||
* Transforms an `object` to a new `accumulator` object which is the result
|
||||
* of running each of its elements through the `callback`, with each `callback`
|
||||
* execution potentially mutating the `accumulator` object. The `callback`is
|
||||
* execution potentially mutating the `accumulator` object. The `callback` is
|
||||
* bound to `thisArg` and invoked with four arguments; (accumulator, value, key, object).
|
||||
* Callbacks may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
|
||||
@@ -3330,7 +3330,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
### <a id="_transformcollection--callbackidentity-accumulator-thisarg"></a>`_.transform(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_transformcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2443 "View in source") [Ⓣ][1]
|
||||
|
||||
Transforms an `object` to an new `accumulator` object which is the result of running each of its elements through the `callback`, with each `callback` execution potentially mutating the `accumulator` object. The `callback`is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
Transforms an `object` to a new `accumulator` object which is the result of running each of its elements through the `callback`, with each `callback` execution potentially mutating the `accumulator` object. The `callback` is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
#### Arguments
|
||||
1. `collection` *(Array|Object)*: The collection to iterate over.
|
||||
|
||||
@@ -2411,9 +2411,9 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms an `object` to an new `accumulator` object which is the result
|
||||
* Transforms an `object` to a new `accumulator` object which is the result
|
||||
* of running each of its elements through the `callback`, with each `callback`
|
||||
* execution potentially mutating the `accumulator` object. The `callback`is
|
||||
* execution potentially mutating the `accumulator` object. The `callback` is
|
||||
* bound to `thisArg` and invoked with four arguments; (accumulator, value, key, object).
|
||||
* Callbacks may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user