mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Ensure _.toArray returns a dence array.
Former-commit-id: 534091d4d200208b8aa831d86801d5e9d73410fe
This commit is contained in:
4
build.js
4
build.js
@@ -1213,7 +1213,7 @@
|
||||
source = replaceFunction(source, 'clone', [
|
||||
' function clone(value) {',
|
||||
' return value && objectTypes[typeof value]',
|
||||
' ? (isArray(value) ? slice.call(value) : assign({}, value))',
|
||||
' ? (isArray(value) ? slice(value) : assign({}, value))',
|
||||
' : value',
|
||||
' }'
|
||||
].join('\n'));
|
||||
@@ -1713,7 +1713,7 @@
|
||||
|
||||
// remove `noCharByIndex` from `_.toArray`
|
||||
source = source.replace(matchFunction(source, 'toArray'), function(match) {
|
||||
return match.replace(/(?:\s*\/\/.*)*\n( *)if *\(noCharByIndex[\s\S]+?\n\1}/, '');
|
||||
return match.replace(/noCharByIndex[^:]+:/, '');
|
||||
});
|
||||
|
||||
// replace `createFunction` with `Function` in `_.template`
|
||||
|
||||
Reference in New Issue
Block a user