@dxos/util 0.8.4-main.bbf232bc24 → 0.8.4-main.bc2380dfbc
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs +38 -22
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +38 -22
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/id.d.ts +30 -0
- package/dist/types/src/id.d.ts.map +1 -0
- package/dist/types/src/id.test.d.ts +2 -0
- package/dist/types/src/id.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/id.test.ts +109 -0
- package/src/id.ts +48 -0
- package/src/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/array-to-hex.ts":{"bytes":2379,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11929,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1259,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1230,"imports":[{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8147,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/browser-storage.ts":{"bytes":6825,"imports":[],"format":"esm"},"src/callback-collection.ts":{"bytes":3085,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":4733,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4504,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1118,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6300,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1473,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":25202,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/composite-key.ts":{"bytes":1461,"imports":[],"format":"esm"},"src/deep.ts":{"bytes":3594,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1474,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3584,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":2931,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2089,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1273,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":701,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19681,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1420,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4145,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1745,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":2986,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3669,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13202,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12805,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":396,"imports":[],"format":"esm"},"src/object.ts":{"bytes":998,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1518,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4900,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3578,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17349,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2425,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1231,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2540,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12738,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4473,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4890,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2767,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2599,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3850,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":13259,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7195,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3861,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5662,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":606,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1076,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":12393,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7153,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6176,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10311,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":9150,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":13604,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5477,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/browser-storage.ts","kind":"import-statement","original":"./browser-storage"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/composite-key.ts","kind":"import-statement","original":"./composite-key"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/filename.ts","kind":"import-statement","original":"./filename"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":157684},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arraySwap","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearCaches","clearIndexedDB","clearOPFS","clearServiceWorkers","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","compositeKey","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isBun","isMobile","isMobileOrTablet","isNode","isNonNullable","isTauri","isTruthy","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","retry","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","safeUrl","setDeep","sortKeys","splitCompositeKey","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1931},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":143},"src/bitfield.ts":{"bytesInOutput":1637},"src/browser-storage.ts":{"bytesInOutput":1360},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":763},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1390},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":5558},"src/composite-key.ts":{"bytesInOutput":132},"src/deep.ts":{"bytesInOutput":530},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"src/error-format.ts":{"bytesInOutput":380},"src/filename.ts":{"bytesInOutput":176},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":800},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2948},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":676},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":5437},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/retry.ts":{"bytesInOutput":903},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":387},"src/safe-parse.ts":{"bytesInOutput":634},"src/safe-stringify.ts":{"bytesInOutput":2691},"src/sliding-window-summary.ts":{"bytesInOutput":1569},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":945},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":3114},"src/tracer.ts":{"bytesInOutput":1390},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2278},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":3309}},"bytes":66158}}}
|
|
1
|
+
{"inputs":{"src/array-to-hex.ts":{"bytes":2379,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11929,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1259,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1230,"imports":[{"path":"node:util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8147,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/browser-storage.ts":{"bytes":6825,"imports":[],"format":"esm"},"src/callback-collection.ts":{"bytes":3085,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":4733,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4504,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1118,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6300,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1473,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":25202,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/composite-key.ts":{"bytes":1461,"imports":[],"format":"esm"},"src/deep.ts":{"bytes":3594,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1474,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3584,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":2931,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2089,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1273,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":701,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19681,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/id.ts":{"bytes":5229,"imports":[],"format":"esm"},"src/map.ts":{"bytes":1420,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4145,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1745,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":2986,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3669,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13202,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12805,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":396,"imports":[],"format":"esm"},"src/object.ts":{"bytes":998,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1518,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4900,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3578,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17349,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2425,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1231,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2540,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12738,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4473,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4890,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2767,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2599,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3850,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":13259,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7195,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3861,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5662,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":606,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1076,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":12393,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7153,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6176,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10311,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":9150,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":13604,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5551,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/browser-storage.ts","kind":"import-statement","original":"./browser-storage"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/composite-key.ts","kind":"import-statement","original":"./composite-key"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/filename.ts","kind":"import-statement","original":"./filename"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/id.ts","kind":"import-statement","original":"./id"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":160180},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arraySwap","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearCaches","clearIndexedDB","clearOPFS","clearServiceWorkers","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","compositeKey","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","id","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isBun","isMobile","isMobileOrTablet","isNode","isNonNullable","isTauri","isTruthy","isWellFormedId","isWellFormedIdPart","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","retry","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","safeUrl","setDeep","sortKeys","splitCompositeKey","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1931},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":143},"src/bitfield.ts":{"bytesInOutput":1637},"src/browser-storage.ts":{"bytesInOutput":1360},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":763},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1390},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":5558},"src/composite-key.ts":{"bytesInOutput":132},"src/deep.ts":{"bytesInOutput":530},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"src/error-format.ts":{"bytesInOutput":380},"src/filename.ts":{"bytesInOutput":176},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/id.ts":{"bytesInOutput":552},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":805},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2948},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":687},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":5437},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/retry.ts":{"bytesInOutput":903},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":387},"src/safe-parse.ts":{"bytesInOutput":634},"src/safe-stringify.ts":{"bytesInOutput":2691},"src/sliding-window-summary.ts":{"bytesInOutput":1569},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":945},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":3114},"src/tracer.ts":{"bytesInOutput":1402},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2278},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":3309}},"bytes":66798}}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded string type for well-formed ids.
|
|
3
|
+
*/
|
|
4
|
+
export type Id = string & {
|
|
5
|
+
readonly __id: unique symbol;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Tagged template literal that constructs a well-formed, dot-delimited id string.
|
|
9
|
+
* Throws if the resulting string is not well-formed.
|
|
10
|
+
*
|
|
11
|
+
* Follows the AT Protocol NSID convention (https://atproto.com/specs/nsid)
|
|
12
|
+
* Full NSID: authority segments (hyphens allowed) + dot + name segment (no hyphens).
|
|
13
|
+
* - Authority segments: at most 253 characters (including periods), and must contain at least two segments.
|
|
14
|
+
* - Name segment: starts with alpha, alphanumeric only (no hyphens), max 63 chars.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* id`org.dxos.plugin.deck` // 'org.dxos.plugin.deck'
|
|
18
|
+
* id`${ns}.${plugin}.deck` // joins interpolated values
|
|
19
|
+
*/
|
|
20
|
+
export declare function id(strings: TemplateStringsArray, ...values: unknown[]): Id;
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the given string is a well-formed NSID.
|
|
23
|
+
*/
|
|
24
|
+
export declare const isWellFormedId: (value: string) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Returns true if the given string is a well-formed NSID name segment:
|
|
27
|
+
* `/^[a-zA-Z][a-zA-Z0-9]{0,62}$/` (starts with alpha, alphanumeric only, no dots or hyphens).
|
|
28
|
+
*/
|
|
29
|
+
export declare const isWellFormedIdPart: (value: string) => boolean;
|
|
30
|
+
//# sourceMappingURL=id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/id.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;;;;;;;;GAYG;AACH,wBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAO1E;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,UAAW,MAAM,KAAG,OAAyB,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,KAAG,OAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.test.d.ts","sourceRoot":"","sources":["../../../src/id.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3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