mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Add built-in Date.now fork back.
This commit is contained in:
@@ -751,6 +751,7 @@
|
||||
nativeKeys = getNative(Object, 'keys'),
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeNow = getNative(Date, 'now'),
|
||||
nativeParseInt = context.parseInt,
|
||||
nativeRandom = Math.random;
|
||||
|
||||
@@ -7280,9 +7281,9 @@
|
||||
* }, _.now());
|
||||
* // => logs the number of milliseconds it took for the deferred function to be invoked
|
||||
*/
|
||||
function now() {
|
||||
var now = nativeNow || function() {
|
||||
return new Date().getTime();
|
||||
}
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user