mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Update vendor/underscore to v1.4.3 and update the Underscore build compatibility.
Former-commit-id: ebcaad4a92848bef3bbf65bb8eb3a0c1553e005c
This commit is contained in:
16
build.js
16
build.js
@@ -841,7 +841,7 @@
|
||||
// clip snippet after the JSDoc comment block
|
||||
match = match.replace(/^\s*(?:\/\/.*|\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)\n/, '');
|
||||
source = source.replace(match, function() {
|
||||
return funcValue;
|
||||
return funcValue.trimRight() + '\n';
|
||||
});
|
||||
}
|
||||
return source;
|
||||
@@ -1313,13 +1313,6 @@
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.isFinite`
|
||||
source = replaceFunction(source, 'isFinite', [
|
||||
' function isFinite(value) {',
|
||||
' return nativeIsFinite(value) && toString.call(value) == numberClass;',
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
// replace `_.omit`
|
||||
source = replaceFunction(source, 'omit', [
|
||||
' function omit(object) {',
|
||||
@@ -1412,6 +1405,11 @@
|
||||
' result = [],',
|
||||
' seen = result;',
|
||||
'',
|
||||
" if (typeof isSorted == 'function') {",
|
||||
' thisArg = callback;',
|
||||
' callback = isSorted;',
|
||||
' isSorted = false;',
|
||||
' }',
|
||||
' if (callback) {',
|
||||
' seen = [];',
|
||||
' callback = createCallback(callback, thisArg);',
|
||||
@@ -1437,7 +1435,7 @@
|
||||
// replace `_.uniqueId`
|
||||
source = replaceFunction(source, 'uniqueId', [
|
||||
' function uniqueId(prefix) {',
|
||||
' var id = idCounter++;',
|
||||
" var id = ++idCounter + '';",
|
||||
' return prefix ? prefix + id : id;',
|
||||
' }'
|
||||
].join('\n'));
|
||||
|
||||
Reference in New Issue
Block a user