mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Add toObject to _.pairs.
This commit is contained in:
@@ -11813,6 +11813,12 @@
|
||||
var object = { '0': 'a', '1': 'b', 'length': 2 };
|
||||
deepEqual(_.pairs(object), [['0', 'a'], ['1', 'b'], ['length', 2]]);
|
||||
});
|
||||
|
||||
test('should work with strings', 2, function() {
|
||||
_.each(['xo', Object('xo')], function(string) {
|
||||
deepEqual(_.pairs(string), [['0', 'x'], ['1', 'o']]);
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user