nanoduration 1.0.0 → 1.0.1
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 +0 -18
- package/package.json +31 -31
package/README.md
CHANGED
|
@@ -21,24 +21,6 @@ The library prioritizes correctness, explicitness, and simplicity over feature b
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
## What this library does
|
|
25
|
-
|
|
26
|
-
- Represents time as an immutable value (internally stored in nanoseconds)
|
|
27
|
-
- Enforces **non-negative durations**
|
|
28
|
-
- Provides **explicit unit constructors** (`seconds`, `milliseconds`, etc.)
|
|
29
|
-
- Supports **saturating arithmetic** (durations never go negative)
|
|
30
|
-
- Avoids all calendar, timezone, and locale concerns
|
|
31
|
-
- Ships with **full TypeScript type definitions**
|
|
32
|
-
|
|
33
|
-
### What it intentionally does not do
|
|
34
|
-
|
|
35
|
-
- Date/time manipulation
|
|
36
|
-
- Parsing human-readable strings
|
|
37
|
-
- Time zones or calendars
|
|
38
|
-
- Implicit unit coercion
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
24
|
## Installation
|
|
43
25
|
|
|
44
26
|
```sh
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "nanoduration",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "An immutable, non-negative, Rust-inspired `Duration` type for JavaScript and TypeScript",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"duration",
|
|
23
|
-
"time",
|
|
24
|
-
"typescript",
|
|
25
|
-
"immutable",
|
|
26
|
-
"esm",
|
|
27
|
-
"rust",
|
|
28
|
-
"value-object"
|
|
29
|
-
],
|
|
30
|
-
"license": "MIT"
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "nanoduration",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "An immutable, non-negative, Rust-inspired `Duration` type for JavaScript and TypeScript",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"duration",
|
|
23
|
+
"time",
|
|
24
|
+
"typescript",
|
|
25
|
+
"immutable",
|
|
26
|
+
"esm",
|
|
27
|
+
"rust",
|
|
28
|
+
"value-object"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT"
|
|
31
|
+
}
|