@alwatr/parse-duration 5.5.10 → 5.5.11
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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/dist/main.cjs +2 -2
- package/dist/main.mjs +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.5.11](https://github.com/Alwatr/nanolib/compare/@alwatr/parse-duration@5.5.10...@alwatr/parse-duration@5.5.11) (2025-09-09)
|
|
7
|
+
|
|
8
|
+
### 🧹 Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* remove trailing newlines from contributing sections in README files ([e8ab1bc](https://github.com/Alwatr/nanolib/commit/e8ab1bc43e0addea5ccd4c897c2cec597cb9e15f))
|
|
11
|
+
|
|
6
12
|
## [5.5.10](https://github.com/Alwatr/nanolib/compare/@alwatr/parse-duration@5.5.9...@alwatr/parse-duration@5.5.10) (2025-09-06)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @alwatr/parse-duration
|
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Parse a duration string or millisecond number into the specified unit (or millis
|
|
|
66
66
|
### Supported Units
|
|
67
67
|
|
|
68
68
|
| Unit | Description | Milliseconds Equivalent |
|
|
69
|
-
|
|
69
|
+
| ---- | ----------- | ----------------------- |
|
|
70
70
|
| `s` | Second | 1,000 |
|
|
71
71
|
| `m` | Minute | 60,000 |
|
|
72
72
|
| `h` | Hour | 3,600,000 |
|
|
@@ -83,7 +83,7 @@ import {parseDuration, DurationUnit, Duration} from '@alwatr/parse-duration';
|
|
|
83
83
|
// Type-safe unit parameter
|
|
84
84
|
function waitFor(time: Duration): Promise<void> {
|
|
85
85
|
const ms = parseDuration(time);
|
|
86
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
86
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// Usage
|
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @alwatr/parse-duration v5.5.
|
|
1
|
+
/* @alwatr/parse-duration v5.5.11 */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -26,7 +26,7 @@ __export(main_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(main_exports);
|
|
27
27
|
var import_is_number = require("@alwatr/is-number");
|
|
28
28
|
var import_package_tracer = require("@alwatr/package-tracer");
|
|
29
|
-
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/parse-duration", "5.5.
|
|
29
|
+
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/parse-duration", "5.5.11");
|
|
30
30
|
var unitConversion = /* @__PURE__ */ Object.freeze({
|
|
31
31
|
s: 1e3,
|
|
32
32
|
m: 6e4,
|
package/dist/main.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* @alwatr/parse-duration v5.5.
|
|
1
|
+
/* @alwatr/parse-duration v5.5.11 */
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
4
|
import { toNumber } from "@alwatr/is-number";
|
|
5
5
|
import { packageTracer } from "@alwatr/package-tracer";
|
|
6
|
-
__dev_mode__: packageTracer.add("@alwatr/parse-duration", "5.5.
|
|
6
|
+
__dev_mode__: packageTracer.add("@alwatr/parse-duration", "5.5.11");
|
|
7
7
|
var unitConversion = /* @__PURE__ */ Object.freeze({
|
|
8
8
|
s: 1e3,
|
|
9
9
|
m: 6e4,
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/parse-duration",
|
|
3
3
|
"description": "A simple utility to parse a duration string into milliseconds number.",
|
|
4
|
-
"version": "5.5.
|
|
4
|
+
"version": "5.5.11",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"bugs": "https://github.com/Alwatr/nanolib/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@alwatr/is-number": "5.7.
|
|
9
|
-
"@alwatr/package-tracer": "5.5.
|
|
8
|
+
"@alwatr/is-number": "5.7.7",
|
|
9
|
+
"@alwatr/package-tracer": "5.5.10"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@alwatr/nano-build": "6.1.
|
|
13
|
-
"@alwatr/prettier-config": "5.0.
|
|
14
|
-
"@alwatr/tsconfig-base": "6.0.
|
|
12
|
+
"@alwatr/nano-build": "6.1.1",
|
|
13
|
+
"@alwatr/prettier-config": "5.0.3",
|
|
14
|
+
"@alwatr/tsconfig-base": "6.0.1",
|
|
15
15
|
"jest": "^30.1.3",
|
|
16
16
|
"typescript": "^5.9.2"
|
|
17
17
|
},
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
},
|
|
79
79
|
"type": "module",
|
|
80
80
|
"types": "./dist/main.d.ts",
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "cd02a1a9fa579930cd54291ba51ed86241313a6d"
|
|
82
82
|
}
|