@apigames/highres-timer
Advanced tools
Comparing version 1.0.22 to 1.0.23
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var json_1 = require("@apigames/json"); | ||
var _perfomancePolyfill = function () { | ||
if ("performance" in window === false) { | ||
if (json_1.isFalse('performance' in window)) { | ||
window.performance = {}; | ||
} | ||
Date.now = (Date.now || (function () { | ||
return new Date().getTime(); | ||
})); | ||
if ("now" in window.performance === false) { | ||
Date.now = (Date.now || (function () { return new Date().getTime(); })); | ||
if (json_1.isFalse('now' in window.performance)) { | ||
var nowOffset_1 = Date.now(); | ||
@@ -25,4 +24,4 @@ if (performance.timing && performance.timing.navigationStart) { | ||
if (previousTimestamp) { | ||
seconds = seconds - previousTimestamp[0]; | ||
nanoseconds = nanoseconds - previousTimestamp[1]; | ||
seconds -= previousTimestamp[0]; | ||
nanoseconds -= previousTimestamp[1]; | ||
if (nanoseconds < 0) { | ||
@@ -40,5 +39,5 @@ seconds--; | ||
}; | ||
if ((typeof process === 'undefined' || typeof process.hrtime === 'undefined') && typeof window.process === 'undefined') { | ||
if ((json_1.isUndefined(typeof process) || json_1.isUndefined(typeof process.hrtime)) && json_1.isUndefined(typeof window.process)) { | ||
window.process = {}; | ||
} | ||
exports.default = typeof process.hrtime === 'undefined' ? (window.process.hrtime = _hrtime) : process.hrtime; | ||
exports.default = json_1.isUndefined(typeof process.hrtime) ? (window.process.hrtime = _hrtime) : process.hrtime; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"main": "lib/index.js", | ||
@@ -22,8 +22,11 @@ "types": "lib/index.d.ts", | ||
}, | ||
"dependencies": { | ||
"@apigames/json": "1.0.52" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "26.0.23", | ||
"@types/node": "14.17.1", | ||
"@typescript-eslint/eslint-plugin": "4.26.0", | ||
"@typescript-eslint/parser": "4.26.0", | ||
"eslint": "7.27.0", | ||
"@types/node": "14.17.4", | ||
"@typescript-eslint/eslint-plugin": "4.28.1", | ||
"@typescript-eslint/parser": "4.28.1", | ||
"eslint": "7.29.0", | ||
"eslint-config-airbnb": "18.2.1", | ||
@@ -34,5 +37,5 @@ "eslint-plugin-import": "2.23.4", | ||
"eslint-plugin-react-hooks": "4.2.0", | ||
"jest": "26.6.3", | ||
"ts-jest": "26.5.6", | ||
"typescript": "4.3.2" | ||
"jest": "27.0.6", | ||
"ts-jest": "27.0.3", | ||
"typescript": "4.3.4" | ||
}, | ||
@@ -39,0 +42,0 @@ "repository": { |
7519
1
85
+ Added@apigames/json@1.0.52
+ Added@apigames/json@1.0.52(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedcall-bind@1.0.8(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addeddeep-equal@2.0.5(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-get-iterator@1.1.3(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedes6-promise@4.2.8(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-bigints@1.1.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinternal-slot@1.1.0(transitive)
+ Addedis-arguments@1.2.0(transitive)
+ Addedis-bigint@1.1.0(transitive)
+ Addedis-boolean-object@1.2.1(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-date-object@1.1.0(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-number-object@1.1.1(transitive)
+ Addedis-regex@1.2.1(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-string@1.1.1(transitive)
+ Addedis-symbol@1.1.1(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakset@2.0.4(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedlodash.clonedeep@4.5.0(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject-is@1.1.6(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.7(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedregexp.prototype.flags@1.5.4(transitive)
+ Addedsafe-regex-test@1.1.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedstop-iteration-iterator@1.1.0(transitive)
+ Addedwhich-boxed-primitive@1.1.1(transitive)
+ Addedwhich-collection@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.18(transitive)