mout
Version:
Modular Utilities
18 lines (17 loc) • 393 B
JavaScript
;
exports.__esModule = true;
/**
* Get current time in miliseconds
*/
function now() {
// yes, we defer the work to another function to allow mocking it
// during the tests
return now.get();
}
now.get =
typeof Date.now === 'function'
? Date.now
: function () {
return +new Date();
};
exports["default"] = now;