mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Correct _#tap doc example. [closes #156]
Former-commit-id: d1f6982e824a97db73546b8594c074b735580f8e
This commit is contained in:
@@ -3633,13 +3633,13 @@
|
||||
* @returns {Mixed} Returns `value`.
|
||||
* @example
|
||||
*
|
||||
* _.chain([1, 2, 3, 200])
|
||||
* _([1, 2, 3, 4])
|
||||
* .filter(function(num) { return num % 2 == 0; })
|
||||
* .tap(alert)
|
||||
* .map(function(num) { return num * num; })
|
||||
* .value();
|
||||
* // => // [2, 200] (alerted)
|
||||
* // => [4, 40000]
|
||||
* // => // [2, 4] (alerted)
|
||||
* // => [4, 16]
|
||||
*/
|
||||
function tap(value, interceptor) {
|
||||
interceptor(value);
|
||||
|
||||
Reference in New Issue
Block a user