mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57:49 +00:00
Simplify arrays iterator options.
Former-commit-id: 7ea81c03f791615bcfec24d8574162c190d49c7d
This commit is contained in:
@@ -585,7 +585,6 @@
|
|||||||
'while (++argsIndex < argsLength) {\n' +
|
'while (++argsIndex < argsLength) {\n' +
|
||||||
' iterable = args[argsIndex];\n' +
|
' iterable = args[argsIndex];\n' +
|
||||||
' if (iterable && objectTypes[typeof iterable]) {',
|
' if (iterable && objectTypes[typeof iterable]) {',
|
||||||
'arrays': false,
|
|
||||||
'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]",
|
'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]",
|
||||||
'bottom': ' }\n}'
|
'bottom': ' }\n}'
|
||||||
};
|
};
|
||||||
@@ -759,7 +758,7 @@
|
|||||||
'support': support,
|
'support': support,
|
||||||
|
|
||||||
// iterator options
|
// iterator options
|
||||||
'arrays': 'isArray(iterable)',
|
'arrays': '',
|
||||||
'bottom': '',
|
'bottom': '',
|
||||||
'init': 'iterable',
|
'init': 'iterable',
|
||||||
'loop': '',
|
'loop': '',
|
||||||
@@ -989,8 +988,7 @@
|
|||||||
'args': 'object',
|
'args': 'object',
|
||||||
'init': '[]',
|
'init': '[]',
|
||||||
'top': 'if (!(objectTypes[typeof object])) return result',
|
'top': 'if (!(objectTypes[typeof object])) return result',
|
||||||
'loop': 'result.push(index)',
|
'loop': 'result.push(index)'
|
||||||
'arrays': false
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user