@eternl/tools 0.9.24 → 0.9.26
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 +39 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
1
|
# @eternl/tools
|
|
2
2
|
|
|
3
|
-
Shared
|
|
3
|
+
Shared utility package for logging and common data helpers.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- log helpers extracted from `eternl-core/log`
|
|
7
|
-
- base utility modules extracted from `eternl-core/lib/base/*` (excluding `bigmath` and `blake`)
|
|
5
|
+
## Installation
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```sh
|
|
7
|
+
```bash
|
|
12
8
|
npm install @eternl/tools
|
|
13
9
|
```
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
## Included Modules
|
|
12
|
+
|
|
13
|
+
- `@eternl/tools/log`
|
|
14
|
+
- Structured console helpers: `el`, `sl`, `warn`, `error`, `json`
|
|
15
|
+
- `@eternl/tools/lib/array`
|
|
16
|
+
- Array utilities
|
|
17
|
+
- `@eternl/tools/lib/crc8`
|
|
18
|
+
- CRC-8 checksum helpers
|
|
19
|
+
- `@eternl/tools/lib/hex`
|
|
20
|
+
- Hex and byte conversion helpers
|
|
21
|
+
- `@eternl/tools/lib/id`
|
|
22
|
+
- ID utilities
|
|
23
|
+
- `@eternl/tools/lib/json`
|
|
24
|
+
- Safe JSON transform helpers
|
|
25
|
+
- `@eternl/tools/lib/math`
|
|
26
|
+
- Numeric helper functions
|
|
27
|
+
- `@eternl/tools/lib/number`
|
|
28
|
+
- Number formatting helpers
|
|
29
|
+
- `@eternl/tools/lib/sleep`
|
|
30
|
+
- Async timing helpers
|
|
31
|
+
- `@eternl/tools/lib/string`
|
|
32
|
+
- String utilities
|
|
33
|
+
- `@eternl/tools/lib/time`
|
|
34
|
+
- Time and timezone helpers
|
|
16
35
|
|
|
17
36
|
## Usage
|
|
18
37
|
|
|
19
|
-
```
|
|
20
|
-
import { el, sl, json }
|
|
21
|
-
import { sleep
|
|
38
|
+
```sh
|
|
39
|
+
import { el, sl, json } from '@eternl/tools/log'
|
|
40
|
+
import { sleep } from '@eternl/tools/lib/sleep'
|
|
41
|
+
import { now } from '@eternl/tools/lib/time'
|
|
22
42
|
|
|
23
43
|
console.log(el('addressBookStore'), sl('loadAddressBook'), json({ ok: true }))
|
|
24
44
|
await sleep(50)
|
|
@@ -27,10 +47,14 @@ console.log(now())
|
|
|
27
47
|
|
|
28
48
|
## Exports
|
|
29
49
|
|
|
30
|
-
- Root
|
|
31
|
-
- `@eternl/tools/log
|
|
32
|
-
- `@eternl/tools/lib
|
|
50
|
+
- Root export re-exports `@eternl/tools/log` and the utility modules in `@eternl/tools/lib/*`.
|
|
51
|
+
- `@eternl/tools/log` exports: `json`, `el`, `er`, `sl`, `warn`, `error`.
|
|
52
|
+
- `@eternl/tools/lib/*` exports feature-specific utility functions by module.
|
|
33
53
|
|
|
34
54
|
## License
|
|
35
55
|
|
|
36
|
-
BUSL-1.1
|
|
56
|
+
Business Source License 1.1 (`BUSL-1.1`).
|
|
57
|
+
|
|
58
|
+
Additional Use Grant: `None`.
|
|
59
|
+
Commercial use requires a separate license from Tastenkunst.
|
|
60
|
+
Contact: https://tastenkunst.com/
|