@xylabs/timer 5.0.94 → 5.0.96

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.
Files changed (2) hide show
  1. package/README.md +54 -65
  2. package/package.json +7 -11
package/README.md CHANGED
@@ -1,120 +1,109 @@
1
1
  # @xylabs/timer
2
2
 
3
- [![logo][]](https://xylabs.com)
3
+ [![npm][npm-badge]][npm-link]
4
+ [![license][license-badge]][license-link]
4
5
 
5
- [![main-build][]][main-build-link]
6
- [![npm-badge][]][npm-link]
7
- [![npm-downloads-badge][]][npm-link]
8
- [![jsdelivr-badge][]][jsdelivr-link]
9
- [![npm-license-badge][]](LICENSE)
10
- [![codacy-badge][]][codacy-link]
11
- [![codeclimate-badge][]][codeclimate-link]
12
- [![snyk-badge][]][snyk-link]
13
- [![socket-badge][]][socket-link]
6
+ > Base functionality used throughout XY Labs TypeScript/JavaScript libraries
14
7
 
8
+ ## Install
15
9
 
16
- Base functionality used throughout XY Labs TypeScript/JavaScript libraries
10
+ Using npm:
17
11
 
12
+ ```sh
13
+ npm install {{name}}
14
+ ```
18
15
 
16
+ Using yarn:
19
17
 
20
- ## Reference
18
+ ```sh
19
+ yarn add {{name}}
20
+ ```
21
21
 
22
- **@xylabs/timer**
22
+ Using pnpm:
23
23
 
24
- ***
24
+ ```sh
25
+ pnpm add {{name}}
26
+ ```
27
+
28
+ Using bun:
29
+
30
+ ```sh
31
+ bun add {{name}}
32
+ ```
25
33
 
26
- ## Functions
27
34
 
28
- | Function | Description |
29
- | ------ | ------ |
30
- | [setTimeoutEx](#functions/setTimeoutEx) | Sets a timeout using an optimized internal timer that coalesces multiple timeouts into a single native timer. |
31
- | [clearTimeoutEx](#functions/clearTimeoutEx) | Cancels a timeout previously created with setTimeoutEx. |
35
+ ## License
36
+
37
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
38
+
39
+ ## Reference
32
40
 
33
- ### functions
41
+ ### packages
34
42
 
35
- ### <a id="clearTimeoutEx"></a>clearTimeoutEx
43
+ ### timer
44
+
45
+ ### .temp-typedoc
46
+
47
+ ### functions
48
+
49
+ ### <a id="clearTimeoutEx"></a>clearTimeoutEx
36
50
 
37
51
  [**@xylabs/timer**](#../README)
38
52
 
39
53
  ***
40
54
 
41
55
  ```ts
42
- function clearTimeoutEx(id: string): void;
56
+ function clearTimeoutEx(id): void;
43
57
  ```
44
58
 
45
59
  Cancels a timeout previously created with setTimeoutEx.
46
60
 
47
61
  ## Parameters
48
62
 
49
- | Parameter | Type | Description |
50
- | ------ | ------ | ------ |
51
- | `id` | `string` | The timeout ID returned by setTimeoutEx. |
63
+ ### id
64
+
65
+ `string`
66
+
67
+ The timeout ID returned by setTimeoutEx.
52
68
 
53
69
  ## Returns
54
70
 
55
71
  `void`
56
72
 
57
- ### <a id="setTimeoutEx"></a>setTimeoutEx
73
+ ### <a id="setTimeoutEx"></a>setTimeoutEx
58
74
 
59
75
  [**@xylabs/timer**](#../README)
60
76
 
61
77
  ***
62
78
 
63
79
  ```ts
64
- function setTimeoutEx(func: Function, delay: number): string;
80
+ function setTimeoutEx(func, delay): string;
65
81
  ```
66
82
 
67
83
  Sets a timeout using an optimized internal timer that coalesces multiple timeouts into a single native timer.
68
84
 
69
85
  ## Parameters
70
86
 
71
- | Parameter | Type | Description |
72
- | ------ | ------ | ------ |
73
- | `func` | `Function` | The function to call after the delay. |
74
- | `delay` | `number` | The delay in milliseconds (must be >= 0). |
75
-
76
- ## Returns
77
-
78
- `string`
87
+ ### func
79
88
 
80
- A unique string ID that can be used with clearTimeoutEx to cancel the timeout.
89
+ `Function`
81
90
 
91
+ The function to call after the delay.
82
92
 
83
- Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
93
+ ### delay
84
94
 
85
- ## Maintainers
95
+ `number`
86
96
 
87
- - [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
88
- - [Matt Jones](https://github.com/jonesmac)
89
- - [Joel Carter](https://github.com/JoelBCarter)
90
- - [Jordan Trouw](https://github.com/jordantrouw)
97
+ The delay in milliseconds (must be >= 0).
91
98
 
92
- ## License
93
-
94
- > See the [LICENSE](LICENSE) file for license details
99
+ ## Returns
95
100
 
96
- ## Credits
101
+ `string`
97
102
 
98
- [Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
103
+ A unique string ID that can be used with clearTimeoutEx to cancel the timeout.
99
104
 
100
- [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
101
105
 
102
- [main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
103
- [main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
104
106
  [npm-badge]: https://img.shields.io/npm/v/@xylabs/timer.svg
105
107
  [npm-link]: https://www.npmjs.com/package/@xylabs/timer
106
- [codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
107
- [codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
108
- [codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
109
- [codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
110
- [snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
111
- [snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
112
-
113
- [npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/timer
114
- [npm-license-badge]: https://img.shields.io/npm/l/@xylabs/timer
115
-
116
- [jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xylabs/timer/badge
117
- [jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xylabs/timer
118
-
119
- [socket-badge]: https://socket.dev/api/badge/npm/package/@xylabs/timer
120
- [socket-link]: https://socket.dev/npm/package/@xylabs/timer
108
+ [license-badge]: https://img.shields.io/npm/l/@xylabs/timer.svg
109
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/timer",
3
- "version": "5.0.94",
3
+ "version": "5.0.96",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -30,12 +30,10 @@
30
30
  "exports": {
31
31
  ".": {
32
32
  "types": "./dist/neutral/index.d.ts",
33
- "import": "./dist/neutral/index.mjs",
34
33
  "default": "./dist/neutral/index.mjs"
35
34
  },
36
35
  "./package.json": "./package.json"
37
36
  },
38
- "types": "./dist/neutral/index.d.ts",
39
37
  "files": [
40
38
  "dist",
41
39
  "!**/*.bench.*",
@@ -44,18 +42,16 @@
44
42
  "README.md"
45
43
  ],
46
44
  "dependencies": {
47
- "@xylabs/assert": "~5.0.94"
45
+ "@xylabs/assert": "~5.0.96"
48
46
  },
49
47
  "devDependencies": {
50
- "@types/node": "^25.5.2",
51
- "@xylabs/ts-scripts-common": "~7.7.3",
52
- "@xylabs/ts-scripts-pnpm": "~7.7.3",
53
- "@xylabs/tsconfig": "~7.7.3",
54
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0",
48
+ "@types/node": "^25.6.0",
49
+ "@xylabs/toolchain": "~7.10.4",
50
+ "@xylabs/tsconfig": "~7.10.4",
55
51
  "esbuild": "^0.28.0",
56
52
  "typescript": "^5",
57
- "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
58
- "vitest": "^4.1.2"
53
+ "vite": "^8.0.8",
54
+ "vitest": "^4.1.4"
59
55
  },
60
56
  "engines": {
61
57
  "node": ">=18"