mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Update _.flip doc example and test to better show effect.
This commit is contained in:
@@ -7489,8 +7489,8 @@
|
||||
* return _.toArray(arguments);
|
||||
* });
|
||||
*
|
||||
* flipped('a', 'b', 'c')
|
||||
* // => ['c', 'b', 'a']
|
||||
* flipped('a', 'b', 'c', 'd');
|
||||
* // => ['d', 'c', 'b', 'a']
|
||||
*/
|
||||
function flip(func) {
|
||||
return createWrapper(func, FLIP_FLAG);
|
||||
|
||||
@@ -4674,7 +4674,7 @@
|
||||
assert.expect(1);
|
||||
|
||||
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