@sapphire/stopwatch 1.2.0-pr-160.676f855.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,6 @@
10
10
  [![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
11
11
  [![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/stopwatch?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/stopwatch)
12
12
  [![npm](https://img.shields.io/npm/v/@sapphire/stopwatch?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/stopwatch)
13
- [![Depfu](https://badges.depfu.com/badges/ec42ff3d6bae55eee1de4749960852b3/count.svg)](https://depfu.com/github/sapphiredev/utilities?project_id=15195)
14
13
 
15
14
  </div>
16
15
 
@@ -101,17 +100,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
101
100
  <td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Nytelife26" title="Documentation">📖</a></td>
102
101
  <td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Alcremie" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AAlcremie" title="Bug reports">🐛</a></td>
103
102
  <td align="center"><a href="https://github.com/RealShadowNova"><img src="https://avatars3.githubusercontent.com/u/46537907?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hezekiah Hendry</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=RealShadowNova" title="Code">💻</a></td>
104
- <td align="center"><a href="https://github.com/Stitch07"><img src="https://avatars.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stitch07</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Tests">⚠️</a></td>
105
103
  <td align="center"><a href="https://github.com/Vetlix"><img src="https://avatars.githubusercontent.com/u/31412314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vetlix</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Vetlix" title="Code">💻</a></td>
106
104
  <td align="center"><a href="https://github.com/ethamitc"><img src="https://avatars.githubusercontent.com/u/27776796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ethan Mitchell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ethamitc" title="Documentation">📖</a></td>
107
105
  <td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=noftaly" title="Code">💻</a></td>
106
+ <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
108
107
  </tr>
109
108
  <tr>
110
- <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
111
109
  <td align="center"><a href="https://fanoulis.dev/"><img src="https://avatars.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=cfanoulis" title="Documentation">📖</a></td>
112
110
  <td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="#maintenance-dependabot[bot]" title="Maintenance">🚧</a></td>
113
111
  <td align="center"><a href="https://kaname.netlify.app/"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kaname-png" title="Code">💻</a></td>
114
112
  <td align="center"><a href="https://github.com/nandhagk"><img src="https://avatars.githubusercontent.com/u/62976649?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandhagk</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/issues?q=author%3Anandhagk" title="Bug reports">🐛</a></td>
113
+ <td align="center"><a href="https://megatank58.me/"><img src="https://avatars.githubusercontent.com/u/51410502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Megatank58</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Megatank58" title="Code">💻</a></td>
114
+ <td align="center"><a href="https://github.com/UndiedGamer"><img src="https://avatars.githubusercontent.com/u/84702365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>UndiedGamer</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=UndiedGamer" title="Code">💻</a></td>
115
115
  </tr>
116
116
  </table>
117
117
 
package/dist/index.js CHANGED
@@ -32,35 +32,35 @@ class Stopwatch {
32
32
  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
33
33
  _Stopwatch_end.set(this, void 0);
34
34
  this.digits = digits;
35
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
36
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f");
35
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
36
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f");
37
37
  }
38
38
  /**
39
39
  * The duration of this stopwatch since start or start to end if this stopwatch has stopped.
40
40
  */
41
41
  get duration() {
42
- return tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f") ? tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f") - tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f") : perf_hooks_1.performance.now() - tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f");
42
+ return (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f") ? (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f") - (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f") : perf_hooks_1.performance.now() - (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f");
43
43
  }
44
44
  /**
45
45
  * If the stopwatch is running or not.
46
46
  */
47
47
  get running() {
48
- return Boolean(!tslib_1.__classPrivateFieldGet(this, _Stopwatch_end, "f"));
48
+ return Boolean(!(0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_end, "f"));
49
49
  }
50
50
  /**
51
51
  * Restarts the stopwatch (Returns a running state)
52
52
  */
53
53
  restart() {
54
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
55
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f");
54
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
55
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f");
56
56
  return this;
57
57
  }
58
58
  /**
59
59
  * Resets the Stopwatch to 0 duration (Returns a stopped state)
60
60
  */
61
61
  reset() {
62
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
63
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, tslib_1.__classPrivateFieldGet(this, _Stopwatch_start, "f"), "f");
62
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now(), "f");
63
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, (0, tslib_1.__classPrivateFieldGet)(this, _Stopwatch_start, "f"), "f");
64
64
  return this;
65
65
  }
66
66
  /**
@@ -68,8 +68,8 @@ class Stopwatch {
68
68
  */
69
69
  start() {
70
70
  if (!this.running) {
71
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_start, perf_hooks_1.performance.now() - this.duration, "f");
72
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, null, "f");
71
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_start, perf_hooks_1.performance.now() - this.duration, "f");
72
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, null, "f");
73
73
  }
74
74
  return this;
75
75
  }
@@ -78,7 +78,7 @@ class Stopwatch {
78
78
  */
79
79
  stop() {
80
80
  if (this.running)
81
- tslib_1.__classPrivateFieldSet(this, _Stopwatch_end, perf_hooks_1.performance.now(), "f");
81
+ (0, tslib_1.__classPrivateFieldSet)(this, _Stopwatch_end, perf_hooks_1.performance.now(), "f");
82
82
  return this;
83
83
  }
84
84
  /**
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,2CAAyC;AAEzC;;GAEG;AACH,MAAa,SAAS;IAkBrB;;OAEG;IACH,YAAmB,MAAM,GAAG,CAAC;QApB7B;;WAEG;QACH;;;;;WAAsB;QAEtB;;WAEG;QACH,4EAA4E;QAC5E,mCAAe;QAEf;;WAEG;QACH,4EAA4E;QAC5E,iCAAoB;QAMnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,+BAAA,IAAI,oBAAU,wBAAW,CAAC,GAAG,EAAE,MAAA,CAAC;QAChC,+BAAA,IAAI,kBAAQ,IAAI,MAAA,CAAC;I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AK;QACX,oCAAA,IAAI,oBAAU,wBAAW,CAAC,GAAG,EAAE,MAAA,CAAC;QAChC,oCAAA,IAAI,kBAAQ,oCAAA,IAAI,wBAAO,MAAA,CAAC;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACI,KAAK;QACX,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAClB,oCAAA,IAAI,oBAAU,wBAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,MAAA,CAAC;YAChD,oCAAA,IAAI,kBAAQ,IAAI,MAAA,CAAC;SACjB;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACI,IAAI;QACV,IAAI,IAAI,CAAC,OAAO;YAAE,oCAAA,IAAI,kBAAQ,wBAAW,CAAC,GAAG,EAAE,MAAA,CAAC;QAChD,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACI,QAAQ;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,IAAI,IAAI,IAAI,IAAI;YAAE,OAAO,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAClE,IAAI,IAAI,IAAI,CAAC;YAAE,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACvD,OAAO,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAClD,CAAC;CACD;AAxFD,8BAwFC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@sapphire/stopwatch",
3
- "version": "1.2.0-pr-160.676f855.0",
3
+ "version": "1.2.0",
4
4
  "description": "Accurately measure passing time.",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.mjs",
9
9
  "types": "dist/index.d.ts",
10
+ "typedocMain": "src/index.ts",
10
11
  "exports": {
11
12
  "import": "./dist/index.mjs",
12
13
  "require": "./dist/index.js"
@@ -34,8 +35,8 @@
34
35
  "!dist/*.tsbuildinfo"
35
36
  ],
36
37
  "engines": {
37
- "node": ">=14",
38
- "npm": ">=6"
38
+ "node": ">=v14.18.0",
39
+ "npm": ">=7.24.1"
39
40
  },
40
41
  "keywords": [
41
42
  "@sapphire/stopwatch",
@@ -53,5 +54,5 @@
53
54
  "publishConfig": {
54
55
  "access": "public"
55
56
  },
56
- "gitHead": "676f8550d2cffd220af23a24fe6f70d0d6b2b1b7"
57
+ "gitHead": "18e0df218137b1c05c22fc3c066619e635ffb8dc"
57
58
  }
package/dist/index.mjs DELETED
@@ -1,4 +0,0 @@
1
- import mod from "./index.js";
2
-
3
- export default mod;
4
- export const Stopwatch = mod.Stopwatch;