@sapphire/stopwatch
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -6,2 +6,8 @@ # Change Log | ||
## [1.0.6](https://github.com/sapphire-project/utilities/compare/@sapphire/stopwatch@1.0.5...@sapphire/stopwatch@1.0.6) (2021-03-16) | ||
### Bug Fixes | ||
- **stopwatch:** add tslib dependency ([5e7f690](https://github.com/sapphire-project/utilities/commit/5e7f6903475ccfec2147b97f8aa56fb7c037a860)) | ||
## [1.0.5](https://github.com/sapphire-project/utilities/compare/@sapphire/stopwatch@1.0.4...@sapphire/stopwatch@1.0.5) (2021-02-16) | ||
@@ -8,0 +14,0 @@ |
"use strict"; | ||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to set private field on non-instance"); | ||
} | ||
privateMap.set(receiver, value); | ||
return value; | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to get private field on non-instance"); | ||
} | ||
return privateMap.get(receiver); | ||
}; | ||
var _start, _end; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Stopwatch = void 0; | ||
const tslib_1 = require("tslib"); | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -47,4 +35,4 @@ /** | ||
this.digits = digits; | ||
__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
__classPrivateFieldSet(this, _end, null); | ||
tslib_1.__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
tslib_1.__classPrivateFieldSet(this, _end, null); | ||
} | ||
@@ -55,3 +43,3 @@ /** | ||
get duration() { | ||
return __classPrivateFieldGet(this, _end) ? __classPrivateFieldGet(this, _end) - __classPrivateFieldGet(this, _start) : perf_hooks_1.performance.now() - __classPrivateFieldGet(this, _start); | ||
return tslib_1.__classPrivateFieldGet(this, _end) ? tslib_1.__classPrivateFieldGet(this, _end) - tslib_1.__classPrivateFieldGet(this, _start) : perf_hooks_1.performance.now() - tslib_1.__classPrivateFieldGet(this, _start); | ||
} | ||
@@ -62,3 +50,3 @@ /** | ||
get running() { | ||
return Boolean(!__classPrivateFieldGet(this, _end)); | ||
return Boolean(!tslib_1.__classPrivateFieldGet(this, _end)); | ||
} | ||
@@ -69,4 +57,4 @@ /** | ||
restart() { | ||
__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
__classPrivateFieldSet(this, _end, null); | ||
tslib_1.__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
tslib_1.__classPrivateFieldSet(this, _end, null); | ||
return this; | ||
@@ -78,4 +66,4 @@ } | ||
reset() { | ||
__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
__classPrivateFieldSet(this, _end, __classPrivateFieldGet(this, _start)); | ||
tslib_1.__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now()); | ||
tslib_1.__classPrivateFieldSet(this, _end, tslib_1.__classPrivateFieldGet(this, _start)); | ||
return this; | ||
@@ -88,4 +76,4 @@ } | ||
if (!this.running) { | ||
__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now() - this.duration); | ||
__classPrivateFieldSet(this, _end, null); | ||
tslib_1.__classPrivateFieldSet(this, _start, perf_hooks_1.performance.now() - this.duration); | ||
tslib_1.__classPrivateFieldSet(this, _end, null); | ||
} | ||
@@ -99,3 +87,3 @@ return this; | ||
if (this.running) | ||
__classPrivateFieldSet(this, _end, perf_hooks_1.performance.now()); | ||
tslib_1.__classPrivateFieldSet(this, _end, perf_hooks_1.performance.now()); | ||
return this; | ||
@@ -102,0 +90,0 @@ } |
{ | ||
"name": "@sapphire/stopwatch", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Accurately measure passing time.", | ||
@@ -23,2 +23,5 @@ "author": "@sapphire", | ||
}, | ||
"dependencies": { | ||
"tslib": "2.x" | ||
}, | ||
"repository": { | ||
@@ -53,3 +56,3 @@ "type": "git", | ||
}, | ||
"gitHead": "f66e4421b7a01b192a5dd26f106505ed16b4158f" | ||
"gitHead": "a6f3355376a1a7cb641923c62c0b88f28ec7bc35" | ||
} |
Sorry, the diff of this file is not supported yet
20464
1
143
+ Addedtslib@2.x
+ Addedtslib@2.8.1(transitive)