@sapphire/timer-manager 1.0.1-next.fb278ba.0 β†’ 1.0.1-next.fc311bf.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
@@ -37,6 +37,28 @@ You can use the following command to install this package, or replace `npm insta
37
37
  npm install @sapphire/timer-manager
38
38
  ```
39
39
 
40
+ ## Usage
41
+
42
+ **Note:** While this section uses `require`, the imports match 1:1 with ESM imports. For example `const { TimerManager } = require('@sapphire/timer-manager')` equals `import { TimerManager } from '@sapphire/timer-manager'`.
43
+
44
+ ### Basic Usage
45
+
46
+ ```typescript
47
+ // Import the TimerManager class
48
+ const { TimerManager } = require('@sapphire/timer-manager');
49
+
50
+ // Use the class for timeouts
51
+ const timeout = TimerManager.setTimeout(() => console.log('Hello, world!'), 1000);
52
+ TimerManager.clearTimeout(timeout);
53
+
54
+ // Use the class for intervals
55
+ const interval = TimerManager.setInterval(() => console.log('Hello, world!'), 1000);
56
+ TimerManager.clearInterval(interval);
57
+
58
+ // Destroy all running timeouts and intervals so that NodeJS can gracefully exit
59
+ TimerManager.destroy();
60
+ ```
61
+
40
62
  ## Buy us some doughnuts
41
63
 
42
64
  Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
@@ -109,6 +131,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
109
131
  <td align="center"><a href="https://enes.ovh/"><img src="https://avatars.githubusercontent.com/u/61084101?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enes GenΓ§</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=enxg" title="Code">πŸ’»</a></td>
110
132
  <td align="center"><a href="https://github.com/muchnameless"><img src="https://avatars.githubusercontent.com/u/12682826?v=4?s=100" width="100px;" alt=""/><br /><sub><b>muchnameless</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=muchnameless" title="Code">πŸ’»</a></td>
111
133
  <td align="center"><a href="https://github.com/r-priyam"><img src="https://avatars.githubusercontent.com/u/50884372?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Priyam</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=r-priyam" title="Code">πŸ’»</a></td>
134
+ <td align="center"><a href="https://github.com/legendhimslef"><img src="https://avatars.githubusercontent.com/u/69213593?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Voxelli</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=legendhimslef" title="Code">πŸ’»</a></td>
135
+ <td align="center"><a href="https://github.com/CitTheDev"><img src="https://avatars.githubusercontent.com/u/94020875?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cit The Dev</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=CitTheDev" title="Code">πŸ’»</a></td>
136
+ </tr>
137
+ <tr>
138
+ <td align="center"><a href="https://www.goestav.com/"><img src="https://avatars.githubusercontent.com/u/27970303?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Goestav</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=goestav" title="Code">πŸ’»</a></td>
139
+ <td align="center"><a href="https://github.com/didinele"><img src="https://avatars.githubusercontent.com/u/27137376?v=4?s=100" width="100px;" alt=""/><br /><sub><b>DD</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=didinele" title="Code">πŸ’»</a></td>
140
+ <td align="center"><a href="https://steamcommunity.com/id/06000208"><img src="https://avatars.githubusercontent.com/u/52764066?v=4?s=100" width="100px;" alt=""/><br /><sub><b>amber</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=06000208" title="Code">πŸ’»</a></td>
112
141
  </tr>
113
142
  </table>
114
143
 
@@ -47,9 +47,8 @@ var SapphireTimerManager = (function (exports) {
47
47
 
48
48
  exports.TimerManager = TimerManager;
49
49
 
50
- Object.defineProperty(exports, '__esModule', { value: true });
51
-
52
50
  return exports;
53
51
 
54
52
  })({});
53
+ //# sourceMappingURL=out.js.map
55
54
  //# sourceMappingURL=index.global.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var __defProp = Object.defineProperty;
6
4
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -47,4 +45,5 @@ __publicField(TimerManager, "storedTimeouts", /* @__PURE__ */ new Set());
47
45
  __publicField(TimerManager, "storedIntervals", /* @__PURE__ */ new Set());
48
46
 
49
47
  exports.TimerManager = TimerManager;
48
+ //# sourceMappingURL=out.js.map
50
49
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -43,4 +43,5 @@ __publicField(TimerManager, "storedTimeouts", /* @__PURE__ */ new Set());
43
43
  __publicField(TimerManager, "storedIntervals", /* @__PURE__ */ new Set());
44
44
 
45
45
  export { TimerManager };
46
+ //# sourceMappingURL=out.js.map
46
47
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/timer-manager",
3
- "version": "1.0.1-next.fb278ba.0",
3
+ "version": "1.0.1-next.fc311bf.0",
4
4
  "description": "A timer manager utility library for JavaScript.",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -57,12 +57,12 @@
57
57
  "access": "public"
58
58
  },
59
59
  "devDependencies": {
60
- "@favware/cliff-jumper": "^1.8.8",
61
- "@vitest/coverage-c8": "^0.23.4",
62
- "tsup": "^6.2.3",
63
- "typedoc": "^0.23.15",
64
- "typedoc-json-parser": "^5.0.1",
65
- "typescript": "^4.8.4",
66
- "vitest": "^0.23.4"
60
+ "@favware/cliff-jumper": "^1.9.0",
61
+ "@vitest/coverage-c8": "^0.26.2",
62
+ "tsup": "^6.5.0",
63
+ "typedoc": "^0.23.23",
64
+ "typedoc-json-parser": "^7.0.2",
65
+ "typescript": "^4.9.4",
66
+ "vitest": "^0.26.2"
67
67
  }
68
68
  }