@demicodes/utils 0.11.0 → 0.13.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 +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,12 +13,14 @@ test enforces this).
|
|
|
13
13
|
- **async** — `noop`, `deferred`, `delay`, `withTimeout`, `waitFor`
|
|
14
14
|
- **bytes** — `encodeUtf8`, `decodeUtf8`, `utf8Bytes`, `utf8Slice`, `concatBytes`
|
|
15
15
|
- **strings** — `clamp`, `truncate`, `tail`, `shortHash`, `normalizeBaseUrl`
|
|
16
|
-
- **json** — `parseJsonOrString`, `parseJsonObject
|
|
16
|
+
- **json** — `parseJsonOrString`, `parseJsonObject`, plus the portable JSON codec
|
|
17
|
+
(`stringifyPortableJson` / `parsePortableJson`) that round-trips `Uint8Array`
|
|
18
|
+
and `bigint` for agent transports and `HostStore` implementations
|
|
17
19
|
- **paths** — `normalizePath`, `dirnamePath`, `isAbsolutePath`
|
|
18
20
|
- **id** — `createId`
|
|
19
21
|
|
|
20
22
|
```ts
|
|
21
|
-
import { errorMessage, truncate, parseJsonObject } from '@demicodes/utils'
|
|
23
|
+
import { errorMessage, truncate, parseJsonObject, stringifyPortableJson } from '@demicodes/utils'
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
Part of [Demi](../../README.md). Apache-2.0.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demicodes/utils",
|
|
3
3
|
"description": "Shared zero-dependency utilities for Demi (type guards, errors, async, bytes, strings, paths, JSON).",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.mjs",
|