mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Optimize _.pairs.
Former-commit-id: 1de87609a8635fb8d48bc558fbdabc545da53b4b
This commit is contained in:
@@ -1865,7 +1865,7 @@
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to inspect..
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns new array of key-value pairs.
|
||||
* @example
|
||||
*
|
||||
@@ -1875,7 +1875,7 @@
|
||||
var pairs = createIterator({
|
||||
'args': 'object',
|
||||
'init':'[]',
|
||||
'inLoop': 'result.push([index, value])'
|
||||
'inLoop': 'result' + (isKeysFast ? '[ownIndex] = ' : '.push') + '([index, value])'
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user