Simplify _.now and _.isFinite.

This commit is contained in:
jdalton
2015-05-26 11:39:29 -07:00
parent d266a0c0ce
commit 6bcbb6f7bb

View File

@@ -765,8 +765,6 @@
nativeKeys = getNative(Object, 'keys'), nativeKeys = getNative(Object, 'keys'),
nativeMax = Math.max, nativeMax = Math.max,
nativeMin = Math.min, nativeMin = Math.min,
nativeNow = getNative(Date, 'now'),
nativeNumIsFinite = getNative(Number, 'isFinite'),
nativeParseInt = context.parseInt, nativeParseInt = context.parseInt,
nativeRandom = Math.random; nativeRandom = Math.random;
@@ -7293,9 +7291,9 @@
* }, _.now()); * }, _.now());
* // => logs the number of milliseconds it took for the deferred function to be invoked * // => logs the number of milliseconds it took for the deferred function to be invoked
*/ */
var now = nativeNow || function() { function now() {
return new Date().getTime(); return new Date().getTime();
}; }
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
@@ -8679,9 +8677,9 @@
* _.isFinite(Infinity); * _.isFinite(Infinity);
* // => false * // => false
*/ */
var isFinite = nativeNumIsFinite || function(value) { function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value); return typeof value == 'number' && nativeIsFinite(value);
}; }
/** /**
* Checks if `value` is classified as a `Function` object. * Checks if `value` is classified as a `Function` object.