mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Update builds and docs.
Former-commit-id: 57709d874ed5b6855daf536c2a0977738665c3c1
This commit is contained in:
23
dist/lodash.underscore.js
vendored
23
dist/lodash.underscore.js
vendored
@@ -131,7 +131,7 @@
|
||||
nativeRandom = Math.random;
|
||||
|
||||
/** Detect various environments */
|
||||
var isIeOpera = !!window.attachEvent,
|
||||
var isIeOpera = reNative.test(window.attachEvent),
|
||||
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
|
||||
|
||||
/* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */
|
||||
@@ -334,7 +334,9 @@
|
||||
}
|
||||
if (this instanceof bound) {
|
||||
// ensure `new bound` is an instance of `func`
|
||||
thisBinding = createObject(func.prototype);
|
||||
noop.prototype = func.prototype;
|
||||
thisBinding = new noop;
|
||||
noop.prototype = null;
|
||||
|
||||
// mimic the constructor's `return` behavior
|
||||
// http://es5.github.com/#x13.2.2
|
||||
@@ -404,20 +406,6 @@
|
||||
return func;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new object that inherits from the given `prototype` object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} prototype The prototype object.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function createObject(prototype) {
|
||||
noop.prototype = prototype;
|
||||
var result = new noop;
|
||||
noop.prototype = null;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function compiled to iterate `arguments` objects, arrays, objects, and
|
||||
* strings consistenly across environments, executing the `callback` for each
|
||||
@@ -3844,7 +3832,6 @@
|
||||
* interpolate - The "interpolate" delimiter regexp.
|
||||
* sourceURL - The sourceURL of the template's compiled source.
|
||||
* variable - The data object variable name.
|
||||
*
|
||||
* @returns {Function|String} Returns a compiled function when no `data` object
|
||||
* is given, else it returns the interpolated text.
|
||||
* @example
|
||||
@@ -4314,7 +4301,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
if (freeExports) {
|
||||
if (freeExports && !freeExports.nodeType) {
|
||||
// in Node.js or RingoJS v0.8.0+
|
||||
if (freeModule) {
|
||||
(freeModule.exports = lodash)._ = lodash;
|
||||
|
||||
Reference in New Issue
Block a user