mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Update _.flip doc example and test to better show effect.
This commit is contained in:
@@ -7489,8 +7489,8 @@
|
|||||||
* return _.toArray(arguments);
|
* return _.toArray(arguments);
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* flipped('a', 'b', 'c')
|
* flipped('a', 'b', 'c', 'd');
|
||||||
* // => ['c', 'b', 'a']
|
* // => ['d', 'c', 'b', 'a']
|
||||||
*/
|
*/
|
||||||
function flip(func) {
|
function flip(func) {
|
||||||
return createWrapper(func, FLIP_FLAG);
|
return createWrapper(func, FLIP_FLAG);
|
||||||
|
|||||||
@@ -4674,7 +4674,7 @@
|
|||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
var flipped = _.flip(fn);
|
var flipped = _.flip(fn);
|
||||||
assert.deepEqual(flipped('a', 'b', 'c'), ['c', 'b', 'a']);
|
assert.deepEqual(flipped('a', 'b', 'c', 'd'), ['d', 'c', 'b', 'a']);
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user