mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Move lodash instance check up in lodash function and tweak chaining benchmark.
Former-commit-id: 799ae05e5180ee87bb2a5249be3e442ed0425ef7
This commit is contained in:
6
build.js
6
build.js
@@ -2017,12 +2017,12 @@
|
||||
// replace `lodash`
|
||||
source = replaceFunction(source, 'lodash', [
|
||||
'function lodash(value) {',
|
||||
' if (value instanceof lodash) {',
|
||||
' return value;',
|
||||
' }',
|
||||
' if (!(this instanceof lodash)) {',
|
||||
' return new lodash(value);',
|
||||
' }',
|
||||
' if (value instanceof lodash) {',
|
||||
' return value;',
|
||||
' }',
|
||||
' this.__wrapped__ = value;',
|
||||
'}'
|
||||
].join('\n'));
|
||||
|
||||
Reference in New Issue
Block a user