Rebuild files and docs.

This commit is contained in:
John-David Dalton
2013-11-29 20:37:56 -06:00
parent 603be609a1
commit 2afbe9514b
7 changed files with 308 additions and 273 deletions

View File

@@ -215,11 +215,11 @@
propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = root.isFinite,
nativeIsNaN = root.isNaN,
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
nativeMax = Math.max,
nativeMin = Math.min,
nativeRandom = Math.random;
@@ -858,6 +858,17 @@
return result;
}
/**
* Checks if `value` is a native function.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
*/
function isNative(value) {
return typeof value == 'function' && reNative.test(value);
}
/**
* Used by `unescape` to convert HTML entities to characters.
*
@@ -4324,7 +4335,7 @@
* _.defer(function() { console.log(_.now() - stamp); });
* // => logs the number of milliseconds it took for the deferred function to be called
*/
var now = reNative.test(now = Date.now) && now || function() {
var now = isNative(now = Date.now) && now || function() {
return new Date().getTime();
};