mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Allow _.zipObject to accept an array of keys without assuming its an array of key/value pairs. [closes #397]
This commit is contained in:
@@ -7634,6 +7634,11 @@
|
||||
deepEqual(actual, object);
|
||||
});
|
||||
|
||||
test('should not assume `keys` is two dimensional if `values` is not provided', 1, function() {
|
||||
var actual = _.zipObject(['barney', 'fred']);
|
||||
deepEqual(actual, { 'barney': undefined, 'fred': undefined });
|
||||
});
|
||||
|
||||
test('should accept a falsey `array` argument', 1, function() {
|
||||
var expected = _.map(falsey, function() { return {}; });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user