Cleanup lodash.js.

Former-commit-id: a1b7dc187dbd562b62d3446ce731674e0bb539d9
This commit is contained in:
John-David Dalton
2012-07-02 03:00:01 -04:00
parent 434e23c209
commit fb818f3775

View File

@@ -9,7 +9,7 @@
'use strict';
/**
* Used to match potentially incorrect data object references, i.e. `obj.obj`,
* Used to match potentially incorrect data object references, like `obj.obj`,
* in compiled templates. The variables are assigned in `_.template`.
*/
var lastVariable,
@@ -589,20 +589,6 @@
return token + index;
}
/**
* Used by `template()` to replace "interpolate" template delimiters with tokens.
*
* @private
* @param {String} match The matched template delimiter.
* @param {String} value The delimiter value.
* @returns {String} Returns a token.
*/
function tokenizeInterpolate(match, value) {
var index = tokenized.length;
tokenized[index] = "' +\n((__t = (" + value + ")) == null ? '' : __t) +\n'";
return token + index;
}
/**
* Used by `template()` to replace "evaluate" template delimiters with tokens.
*
@@ -617,6 +603,20 @@
return token + index;
}
/**
* Used by `template()` to replace "interpolate" template delimiters with tokens.
*
* @private
* @param {String} match The matched template delimiter.
* @param {String} value The delimiter value.
* @returns {String} Returns a token.
*/
function tokenizeInterpolate(match, value) {
var index = tokenized.length;
tokenized[index] = "' +\n((__t = (" + value + ")) == null ? '' : __t) +\n'";
return token + index;
}
/*--------------------------------------------------------------------------*/
/**
@@ -1911,7 +1911,8 @@
methodName = thisArg;
thisArg = func;
}
// use if native `Function#bind` is faster
// use `Function#bind` if it exists and is fast
// (in V8 `Function#bind` is slower except when partially applied)
else if (useNativeBind || (nativeBind && arguments.length > 2)) {
return nativeBind.call.apply(nativeBind, arguments);
}