Tweak _.transform docs.

Former-commit-id: dc7100411a403be4cce6b3784e1dd81cc9423b76
This commit is contained in:
John-David Dalton
2013-05-27 22:30:50 -07:00
parent 96e47f3d27
commit ff74ff4149
3 changed files with 5 additions and 5 deletions

View File

@@ -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`.
*

View File

@@ -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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2443 "View in source") [&#x24C9;][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.

View File

@@ -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`.
*