mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Make _.uniqueId consistently return a string value.
Former-commit-id: 5a5c626df83b0fc78e9bae37510680383f112c0b
This commit is contained in:
10
build.js
10
build.js
@@ -105,7 +105,7 @@
|
||||
'isDate': [],
|
||||
'isElement': [],
|
||||
'isEmpty': ['forOwn', 'isArguments', 'isFunction'],
|
||||
'isEqual': ['forOwn', 'isFunction'],
|
||||
'isEqual': ['forIn', 'isFunction'],
|
||||
'isFinite': [],
|
||||
'isFunction': [],
|
||||
'isNaN': ['isNumber'],
|
||||
@@ -1434,6 +1434,14 @@
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.uniqueId`
|
||||
source = replaceFunction(source, 'uniqueId', [
|
||||
' function uniqueId(prefix) {',
|
||||
' var id = idCounter++;',
|
||||
' return prefix ? prefix + id : id;',
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.without`
|
||||
source = replaceFunction(source, 'without', [
|
||||
' function without(array) {',
|
||||
|
||||
Reference in New Issue
Block a user