functionalscript 0.13.0 → 0.14.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/{types → fs}/asn.1/module.f.d.ts +1 -1
- package/{types → fs}/asn.1/module.f.js +3 -3
- package/{types → fs}/asn.1/test.f.js +2 -2
- package/{types → fs}/base128/module.f.d.ts +1 -1
- package/{types → fs}/base128/module.f.js +1 -1
- package/{types → fs}/base128/test.f.js +2 -2
- package/{bnf → fs/bnf}/data/module.f.d.ts +1 -1
- package/{cas → fs/cas}/module.f.d.ts +4 -4
- package/{cas → fs/cas}/module.f.js +1 -1
- package/{types → fs}/cbase32/module.f.d.ts +2 -2
- package/{types → fs}/cbase32/module.f.js +1 -1
- package/{types → fs}/cbase32/test.f.js +1 -1
- package/fs/ci/bun/module.f.d.ts +2 -0
- package/fs/ci/bun/module.f.js +20 -0
- package/fs/ci/common/module.f.d.ts +43 -0
- package/fs/ci/common/module.f.js +32 -0
- package/fs/ci/config/module.f.d.ts +25 -0
- package/fs/ci/config/module.f.js +34 -0
- package/fs/ci/deno/module.f.d.ts +2 -0
- package/fs/ci/deno/module.f.js +13 -0
- package/fs/ci/module.f.js +40 -0
- package/fs/ci/node/module.f.d.ts +6 -0
- package/fs/ci/node/module.f.js +36 -0
- package/fs/ci/playwright/module.f.d.ts +2 -0
- package/fs/ci/playwright/module.f.js +23 -0
- package/fs/ci/rust/module.f.d.ts +2 -0
- package/fs/ci/rust/module.f.js +49 -0
- package/{crypto → fs/crypto}/secp/module.f.d.ts +1 -2
- package/{dev → fs/dev}/module.f.d.ts +2 -0
- package/{dev → fs/dev}/module.f.js +5 -0
- package/{dev → fs/dev}/tf/all.test.js +7 -5
- package/{dev → fs/dev}/tf/module.f.d.ts +1 -1
- package/{dev → fs/dev}/tf/module.f.js +12 -9
- package/fs/dev/tf/test.f.d.ts +16 -0
- package/fs/dev/tf/test.f.js +22 -0
- package/fs/dev/version/module.f.d.ts +3 -0
- package/{djs → fs/djs}/tokenizer/module.f.js +3 -3
- package/{djs/parser-new → fs/djs/tokenizer-new}/test.f.d.ts +2 -1
- package/fs/djs/tokenizer-new/test.f.js +894 -0
- package/{html → fs/html}/module.f.d.ts +14 -0
- package/{html → fs/html}/module.f.js +21 -2
- package/{js → fs/js}/tokenizer/module.f.js +34 -34
- package/{json → fs/json}/tokenizer/module.f.js +1 -1
- package/{path → fs/path}/module.f.d.ts +1 -1
- package/fs/sul/id/module.f.d.ts +33 -0
- package/fs/sul/id/module.f.js +94 -0
- package/fs/sul/id/test.f.d.ts +21 -0
- package/fs/sul/id/test.f.js +75 -0
- package/fs/sul/level/hash/module.f.d.ts +38 -0
- package/fs/sul/level/hash/module.f.js +43 -0
- package/fs/sul/level/hash/test.f.d.ts +14 -0
- package/fs/sul/level/hash/test.f.js +112 -0
- package/fs/sul/level/literal/module.f.d.ts +64 -0
- package/fs/sul/level/literal/module.f.js +88 -0
- package/fs/sul/level/literal/test.f.d.ts +12 -0
- package/fs/sul/level/literal/test.f.js +722 -0
- package/fs/sul/module.f.d.ts +23 -0
- package/fs/sul/module.f.js +46 -0
- package/fs/sul/test.f.d.ts +10 -0
- package/fs/sul/test.f.js +47 -0
- package/{text → fs/text}/module.f.d.ts +1 -1
- package/{text → fs/text}/utf16/module.f.js +8 -8
- package/{text → fs/text}/utf8/module.f.js +2 -2
- package/{types → fs/types}/bit_vec/module.f.d.ts +13 -1
- package/{types → fs/types}/bit_vec/module.f.js +33 -15
- package/{types → fs/types}/effects/module.f.d.ts +1 -0
- package/{types → fs/types}/effects/node/virtual/module.f.d.ts +3 -3
- package/{types → fs/types}/function/operator/module.f.d.ts +1 -1
- package/{types → fs/types}/function/operator/module.f.js +1 -1
- package/{types → fs/types}/list/module.f.js +1 -1
- package/fs/types/patricia_trie/module.f.d.ts +25 -0
- package/fs/types/patricia_trie/module.f.js +35 -0
- package/fs/types/patricia_trie/test.f.d.ts +8 -0
- package/fs/types/patricia_trie/test.f.js +121 -0
- package/fs/types/rtti/parse/module.f.d.ts +32 -0
- package/fs/types/rtti/parse/module.f.js +113 -0
- package/fs/types/rtti/parse/test.f.d.ts +104 -0
- package/fs/types/rtti/parse/test.f.js +316 -0
- package/fs/types/rtti/validate/module.f.d.ts +74 -0
- package/{types → fs/types}/rtti/validate/module.f.js +26 -24
- package/{types → fs/types}/rtti/validate/test.f.d.ts +11 -0
- package/{types → fs/types}/rtti/validate/test.f.js +38 -0
- package/{types → fs/types}/uint8array/module.f.d.ts +2 -2
- package/fs/website/module.f.d.ts +4 -0
- package/fs/website/module.f.js +15 -0
- package/package.json +8 -8
- package/ci/module.f.js +0 -183
- package/dev/tf/test.f.d.ts +0 -4
- package/dev/tf/test.f.js +0 -5
- package/dev/version/module.f.d.ts +0 -3
- package/djs/parser-new/test.f.js +0 -202
- package/types/rtti/validate/module.f.d.ts +0 -50
- package/website/module.f.d.ts +0 -4
- package/website/module.f.js +0 -19
- /package/{types → fs}/asn.1/test.f.d.ts +0 -0
- /package/{cas → fs/base128}/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/data/module.f.js +0 -0
- /package/{bnf → fs/bnf}/data/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/data/test.f.js +0 -0
- /package/{bnf → fs/bnf}/module.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/module.f.js +0 -0
- /package/{bnf → fs/bnf}/test.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/test.f.js +0 -0
- /package/{bnf → fs/bnf}/testlib.f.d.ts +0 -0
- /package/{bnf → fs/bnf}/testlib.f.js +0 -0
- /package/{types/base128 → fs/cas}/test.f.d.ts +0 -0
- /package/{cas → fs/cas}/test.f.js +0 -0
- /package/{types → fs}/cbase32/test.f.d.ts +0 -0
- /package/{ci → fs/ci}/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/module.f.js +0 -0
- /package/{crypto → fs/crypto}/hmac/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/hmac/test.f.js +0 -0
- /package/{crypto → fs/crypto}/secp/module.f.js +0 -0
- /package/{crypto → fs/crypto}/secp/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/secp/test.f.js +0 -0
- /package/{crypto → fs/crypto}/sha2/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sha2/module.f.js +0 -0
- /package/{crypto → fs/crypto}/sha2/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sha2/test.f.js +0 -0
- /package/{crypto → fs/crypto}/sign/module.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sign/module.f.js +0 -0
- /package/{crypto → fs/crypto}/sign/test.f.d.ts +0 -0
- /package/{crypto → fs/crypto}/sign/test.f.js +0 -0
- /package/{dev → fs/dev}/index/module.f.d.ts +0 -0
- /package/{dev → fs/dev}/index/module.f.js +0 -0
- /package/{dev → fs/dev}/test.f.d.ts +0 -0
- /package/{dev → fs/dev}/test.f.js +0 -0
- /package/{dev → fs/dev}/tf/all.test.d.ts +0 -0
- /package/{dev → fs/dev}/version/module.f.js +0 -0
- /package/{dev → fs/dev}/version/test.f.d.ts +0 -0
- /package/{dev → fs/dev}/version/test.f.js +0 -0
- /package/{djs → fs/djs}/ast/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/ast/module.f.js +0 -0
- /package/{djs → fs/djs}/ast/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/ast/test.f.js +0 -0
- /package/{djs → fs/djs}/examples/input.f.d.ts +0 -0
- /package/{djs → fs/djs}/examples/input.f.js +0 -0
- /package/{djs → fs/djs}/examples/m.f.d.ts +0 -0
- /package/{djs → fs/djs}/examples/m.f.js +0 -0
- /package/{djs → fs/djs}/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/module.f.js +0 -0
- /package/{djs → fs/djs}/parser/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/parser/module.f.js +0 -0
- /package/{djs → fs/djs}/parser/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/parser/test.f.js +0 -0
- /package/{djs → fs/djs}/serializer/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/serializer/module.f.js +0 -0
- /package/{djs → fs/djs}/serializer/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/serializer/test.f.js +0 -0
- /package/{djs → fs/djs}/tokenizer/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/tokenizer/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/tokenizer/test.f.js +0 -0
- /package/{djs/parser-new → fs/djs/tokenizer-new}/module.f.d.ts +0 -0
- /package/{djs/parser-new → fs/djs/tokenizer-new}/module.f.js +0 -0
- /package/{djs → fs/djs}/transpiler/module.f.d.ts +0 -0
- /package/{djs → fs/djs}/transpiler/module.f.js +0 -0
- /package/{djs → fs/djs}/transpiler/test.f.d.ts +0 -0
- /package/{djs → fs/djs}/transpiler/test.f.js +0 -0
- /package/{fjs → fs/fjs}/module.d.ts +0 -0
- /package/{fjs → fs/fjs}/module.f.d.ts +0 -0
- /package/{fjs → fs/fjs}/module.f.js +0 -0
- /package/{fjs → fs/fjs}/module.js +0 -0
- /package/{fsc → fs/fsc}/bnf.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/bnf.f.js +0 -0
- /package/{fsc → fs/fsc}/json.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/json.f.js +0 -0
- /package/{fsc → fs/fsc}/module.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/module.f.js +0 -0
- /package/{fsc → fs/fsc}/test.f.d.ts +0 -0
- /package/{fsc → fs/fsc}/test.f.js +0 -0
- /package/{fsm → fs/fsm}/module.f.d.ts +0 -0
- /package/{fsm → fs/fsm}/module.f.js +0 -0
- /package/{fsm → fs/fsm}/test.f.d.ts +0 -0
- /package/{fsm → fs/fsm}/test.f.js +0 -0
- /package/{html → fs/html}/test.f.d.ts +0 -0
- /package/{html → fs/html}/test.f.js +0 -0
- /package/{io → fs/io}/module.d.ts +0 -0
- /package/{io → fs/io}/module.f.d.ts +0 -0
- /package/{io → fs/io}/module.f.js +0 -0
- /package/{io → fs/io}/module.js +0 -0
- /package/{io → fs/io}/virtual/module.f.d.ts +0 -0
- /package/{io → fs/io}/virtual/module.f.js +0 -0
- /package/{js → fs/js}/tokenizer/module.f.d.ts +0 -0
- /package/{js → fs/js}/tokenizer/test.f.d.ts +0 -0
- /package/{js → fs/js}/tokenizer/test.f.js +0 -0
- /package/{json → fs/json}/module.f.d.ts +0 -0
- /package/{json → fs/json}/module.f.js +0 -0
- /package/{json → fs/json}/parser/module.f.d.ts +0 -0
- /package/{json → fs/json}/parser/module.f.js +0 -0
- /package/{json → fs/json}/parser/test.f.d.ts +0 -0
- /package/{json → fs/json}/parser/test.f.js +0 -0
- /package/{json → fs/json}/serializer/module.f.d.ts +0 -0
- /package/{json → fs/json}/serializer/module.f.js +0 -0
- /package/{json → fs/json}/serializer/test.f.d.ts +0 -0
- /package/{json → fs/json}/serializer/test.f.js +0 -0
- /package/{json → fs/json}/test.f.d.ts +0 -0
- /package/{json → fs/json}/test.f.js +0 -0
- /package/{json → fs/json}/tokenizer/module.f.d.ts +0 -0
- /package/{json → fs/json}/tokenizer/test.f.d.ts +0 -0
- /package/{json → fs/json}/tokenizer/test.f.js +0 -0
- /package/{path → fs/path}/module.f.js +0 -0
- /package/{path → fs/path}/test.f.d.ts +0 -0
- /package/{path → fs/path}/test.f.js +0 -0
- /package/{text → fs/text}/ascii/module.f.d.ts +0 -0
- /package/{text → fs/text}/ascii/module.f.js +0 -0
- /package/{text → fs/text}/ascii/test.f.d.ts +0 -0
- /package/{text → fs/text}/ascii/test.f.js +0 -0
- /package/{text → fs/text}/module.f.js +0 -0
- /package/{text → fs/text}/sgr/module.f.d.ts +0 -0
- /package/{text → fs/text}/sgr/module.f.js +0 -0
- /package/{text → fs/text}/sgr/test.f.d.ts +0 -0
- /package/{text → fs/text}/sgr/test.f.js +0 -0
- /package/{text → fs/text}/test.f.d.ts +0 -0
- /package/{text → fs/text}/test.f.js +0 -0
- /package/{text → fs/text}/utf16/module.f.d.ts +0 -0
- /package/{text → fs/text}/utf16/test.f.d.ts +0 -0
- /package/{text → fs/text}/utf16/test.f.js +0 -0
- /package/{text → fs/text}/utf8/module.f.d.ts +0 -0
- /package/{text → fs/text}/utf8/test.f.d.ts +0 -0
- /package/{text → fs/text}/utf8/test.f.js +0 -0
- /package/{types → fs/types}/array/module.f.d.ts +0 -0
- /package/{types → fs/types}/array/module.f.js +0 -0
- /package/{types → fs/types}/array/test.f.d.ts +0 -0
- /package/{types → fs/types}/array/test.f.js +0 -0
- /package/{types → fs/types}/bigfloat/module.f.d.ts +0 -0
- /package/{types → fs/types}/bigfloat/module.f.js +0 -0
- /package/{types → fs/types}/bigfloat/test.f.d.ts +0 -0
- /package/{types → fs/types}/bigfloat/test.f.js +0 -0
- /package/{types → fs/types}/bigint/module.f.d.ts +0 -0
- /package/{types → fs/types}/bigint/module.f.js +0 -0
- /package/{types → fs/types}/bigint/test.f.d.ts +0 -0
- /package/{types → fs/types}/bigint/test.f.js +0 -0
- /package/{types → fs/types}/bit_vec/test.f.d.ts +0 -0
- /package/{types → fs/types}/bit_vec/test.f.js +0 -0
- /package/{types → fs/types}/btree/find/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/find/module.f.js +0 -0
- /package/{types → fs/types}/btree/find/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/find/test.f.js +0 -0
- /package/{types → fs/types}/btree/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/module.f.js +0 -0
- /package/{types → fs/types}/btree/remove/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/remove/module.f.js +0 -0
- /package/{types → fs/types}/btree/remove/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/remove/test.f.js +0 -0
- /package/{types → fs/types}/btree/set/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/set/module.f.js +0 -0
- /package/{types → fs/types}/btree/set/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/set/test.f.js +0 -0
- /package/{types → fs/types}/btree/test.f.d.ts +0 -0
- /package/{types → fs/types}/btree/test.f.js +0 -0
- /package/{types → fs/types}/btree/types/module.f.d.ts +0 -0
- /package/{types → fs/types}/btree/types/module.f.js +0 -0
- /package/{types → fs/types}/byte_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/byte_set/module.f.js +0 -0
- /package/{types → fs/types}/byte_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/byte_set/test.f.js +0 -0
- /package/{types → fs/types}/effects/mock/module.f.d.ts +0 -0
- /package/{types → fs/types}/effects/mock/module.f.js +0 -0
- /package/{types → fs/types}/effects/module.d.ts +0 -0
- /package/{types → fs/types}/effects/module.f.js +0 -0
- /package/{types → fs/types}/effects/module.js +0 -0
- /package/{types → fs/types}/effects/node/module.f.d.ts +0 -0
- /package/{types → fs/types}/effects/node/module.f.js +0 -0
- /package/{types → fs/types}/effects/node/test.f.d.ts +0 -0
- /package/{types → fs/types}/effects/node/test.f.js +0 -0
- /package/{types → fs/types}/effects/node/virtual/module.f.js +0 -0
- /package/{types → fs/types}/function/compare/module.f.d.ts +0 -0
- /package/{types → fs/types}/function/compare/module.f.js +0 -0
- /package/{types → fs/types}/function/compare/test.f.d.ts +0 -0
- /package/{types → fs/types}/function/compare/test.f.js +0 -0
- /package/{types → fs/types}/function/module.f.d.ts +0 -0
- /package/{types → fs/types}/function/module.f.js +0 -0
- /package/{types → fs/types}/function/test.f.d.ts +0 -0
- /package/{types → fs/types}/function/test.f.js +0 -0
- /package/{types → fs/types}/list/module.f.d.ts +0 -0
- /package/{types → fs/types}/list/test.f.d.ts +0 -0
- /package/{types → fs/types}/list/test.f.js +0 -0
- /package/{types → fs/types}/map/module.f.d.ts +0 -0
- /package/{types → fs/types}/map/module.f.js +0 -0
- /package/{types → fs/types}/map/test.f.d.ts +0 -0
- /package/{types → fs/types}/map/test.f.js +0 -0
- /package/{types → fs/types}/monoid/module.f.d.ts +0 -0
- /package/{types → fs/types}/monoid/module.f.js +0 -0
- /package/{types → fs/types}/monoid/test.f.d.ts +0 -0
- /package/{types → fs/types}/monoid/test.f.js +0 -0
- /package/{types → fs/types}/nibble_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/nibble_set/module.f.js +0 -0
- /package/{types → fs/types}/nibble_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/nibble_set/test.f.js +0 -0
- /package/{types → fs/types}/nominal/module.f.d.ts +0 -0
- /package/{types → fs/types}/nominal/module.f.js +0 -0
- /package/{types → fs/types}/nominal/test.f.d.ts +0 -0
- /package/{types → fs/types}/nominal/test.f.js +0 -0
- /package/{types → fs/types}/nullable/module.f.d.ts +0 -0
- /package/{types → fs/types}/nullable/module.f.js +0 -0
- /package/{types → fs/types}/nullable/test.f.d.ts +0 -0
- /package/{types → fs/types}/nullable/test.f.js +0 -0
- /package/{types → fs/types}/number/module.f.d.ts +0 -0
- /package/{types → fs/types}/number/module.f.js +0 -0
- /package/{types → fs/types}/number/test.f.d.ts +0 -0
- /package/{types → fs/types}/number/test.f.js +0 -0
- /package/{types → fs/types}/object/module.f.d.ts +0 -0
- /package/{types → fs/types}/object/module.f.js +0 -0
- /package/{types → fs/types}/object/test.f.d.ts +0 -0
- /package/{types → fs/types}/object/test.f.js +0 -0
- /package/{types → fs/types}/option/module.f.d.ts +0 -0
- /package/{types → fs/types}/option/module.f.js +0 -0
- /package/{types → fs/types}/ordered_map/module.f.d.ts +0 -0
- /package/{types → fs/types}/ordered_map/module.f.js +0 -0
- /package/{types → fs/types}/ordered_map/test.f.d.ts +0 -0
- /package/{types → fs/types}/ordered_map/test.f.js +0 -0
- /package/{types → fs/types}/prime_field/module.f.d.ts +0 -0
- /package/{types → fs/types}/prime_field/module.f.js +0 -0
- /package/{types → fs/types}/prime_field/test.f.d.ts +0 -0
- /package/{types → fs/types}/prime_field/test.f.js +0 -0
- /package/{types → fs/types}/range/module.f.d.ts +0 -0
- /package/{types → fs/types}/range/module.f.js +0 -0
- /package/{types → fs/types}/range/test.f.d.ts +0 -0
- /package/{types → fs/types}/range/test.f.js +0 -0
- /package/{types → fs/types}/range_map/module.f.d.ts +0 -0
- /package/{types → fs/types}/range_map/module.f.js +0 -0
- /package/{types → fs/types}/range_map/test.f.d.ts +0 -0
- /package/{types → fs/types}/range_map/test.f.js +0 -0
- /package/{types → fs/types}/result/module.d.ts +0 -0
- /package/{types → fs/types}/result/module.f.d.ts +0 -0
- /package/{types → fs/types}/result/module.f.js +0 -0
- /package/{types → fs/types}/result/module.js +0 -0
- /package/{types → fs/types}/result/test.f.d.ts +0 -0
- /package/{types → fs/types}/result/test.f.js +0 -0
- /package/{types → fs/types}/rtti/module.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/module.f.js +0 -0
- /package/{types → fs/types}/rtti/test.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/test.f.js +0 -0
- /package/{types → fs/types}/rtti/ts/module.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/ts/module.f.js +0 -0
- /package/{types → fs/types}/rtti/ts/test.f.d.ts +0 -0
- /package/{types → fs/types}/rtti/ts/test.f.js +0 -0
- /package/{types → fs/types}/sorted_list/module.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_list/module.f.js +0 -0
- /package/{types → fs/types}/sorted_list/test.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_list/test.f.js +0 -0
- /package/{types → fs/types}/sorted_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_set/module.f.js +0 -0
- /package/{types → fs/types}/sorted_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/sorted_set/test.f.js +0 -0
- /package/{types → fs/types}/string/module.f.d.ts +0 -0
- /package/{types → fs/types}/string/module.f.js +0 -0
- /package/{types → fs/types}/string/test.f.d.ts +0 -0
- /package/{types → fs/types}/string/test.f.js +0 -0
- /package/{types → fs/types}/string_set/module.f.d.ts +0 -0
- /package/{types → fs/types}/string_set/module.f.js +0 -0
- /package/{types → fs/types}/string_set/test.f.d.ts +0 -0
- /package/{types → fs/types}/string_set/test.f.js +0 -0
- /package/{types → fs/types}/ts/module.f.d.ts +0 -0
- /package/{types → fs/types}/ts/module.f.js +0 -0
- /package/{types → fs/types}/uint8array/module.f.js +0 -0
- /package/{types → fs/types}/uint8array/test.f.d.ts +0 -0
- /package/{types → fs/types}/uint8array/test.f.js +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { assert, assertEq } from "../../../dev/module.f.js";
|
|
2
|
+
import { compress, level3Id } from "../../id/module.f.js";
|
|
3
|
+
import { emptyEncodeState, encode } from "./module.f.js";
|
|
4
|
+
const add = (l, r, m, isSymbol, s) => [...s, [l, r, m, isSymbol]];
|
|
5
|
+
const enc = encode(add);
|
|
6
|
+
const initial = emptyEncodeState([]);
|
|
7
|
+
// Run a complete valid word from a clean state; throws if no output is produced.
|
|
8
|
+
const runWord = (symbols) => {
|
|
9
|
+
let state = initial;
|
|
10
|
+
for (const s of symbols) {
|
|
11
|
+
const [out, newState] = enc(s, state);
|
|
12
|
+
state = newState;
|
|
13
|
+
if (out !== undefined) {
|
|
14
|
+
return [out, state[0]];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
throw symbols;
|
|
18
|
+
};
|
|
19
|
+
// Every stored triple must satisfy m === compress(l, r).
|
|
20
|
+
const verifyStorage = (storage) => {
|
|
21
|
+
for (const [l, r, m] of storage) {
|
|
22
|
+
assertEq(m, compress(l, r));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const s0 = level3Id(0n);
|
|
26
|
+
const s1 = level3Id(1n);
|
|
27
|
+
export default {
|
|
28
|
+
// Minimum word [s0, t] with t == s0
|
|
29
|
+
min_equal: () => {
|
|
30
|
+
const [out, storage] = runWord([s0, s0]);
|
|
31
|
+
assertEq(out, compress(s0, s0));
|
|
32
|
+
assertEq(storage.length, 1);
|
|
33
|
+
verifyStorage(storage);
|
|
34
|
+
},
|
|
35
|
+
// Minimum word [s0, t] with t > s0
|
|
36
|
+
min_greater: () => {
|
|
37
|
+
const [out, storage] = runWord([s0, s1]);
|
|
38
|
+
assertEq(out, compress(s0, s1));
|
|
39
|
+
assertEq(storage.length, 1);
|
|
40
|
+
verifyStorage(storage);
|
|
41
|
+
},
|
|
42
|
+
// All symbols before the terminator return undefined
|
|
43
|
+
intermediate_undefined: () => {
|
|
44
|
+
const [r0, st0] = enc(s1, initial);
|
|
45
|
+
assert(r0 === undefined);
|
|
46
|
+
const [r1, st1] = enc(s0, st0);
|
|
47
|
+
assert(r1 === undefined);
|
|
48
|
+
const [r2] = enc(s1, st1);
|
|
49
|
+
assert(r2 !== undefined);
|
|
50
|
+
},
|
|
51
|
+
// Three-symbol word [s0, s1, t]: end merges (s0,s1), then create merges (root, t)
|
|
52
|
+
three_symbol: () => {
|
|
53
|
+
const [out, storage] = runWord([s1, s0, s0]);
|
|
54
|
+
assertEq(out, compress(compress(s1, s0), s0));
|
|
55
|
+
assertEq(storage.length, 2);
|
|
56
|
+
verifyStorage(storage);
|
|
57
|
+
// first add: merge of the two decreasing-prefix symbols during end
|
|
58
|
+
assertEq(storage[0][0], s1);
|
|
59
|
+
assertEq(storage[0][1], s0);
|
|
60
|
+
// second add: merge of trie root with terminator
|
|
61
|
+
assertEq(storage[1][0], compress(s1, s0));
|
|
62
|
+
assertEq(storage[1][1], s0);
|
|
63
|
+
},
|
|
64
|
+
// Output equals the merged value in the last add call
|
|
65
|
+
output_is_last_add: () => {
|
|
66
|
+
const [out, storage] = runWord([s1, s0, s1]);
|
|
67
|
+
assertEq(out, storage.at(-1)[2]);
|
|
68
|
+
},
|
|
69
|
+
// Stack is empty after flush; storage is preserved
|
|
70
|
+
state_reset: () => {
|
|
71
|
+
const st1 = enc(s0, initial)[1];
|
|
72
|
+
const [, st2] = enc(s0, st1);
|
|
73
|
+
assertEq(st2[1].length, 0);
|
|
74
|
+
assertEq(st2[0].length, 1);
|
|
75
|
+
},
|
|
76
|
+
// Storage grows across consecutive words (not wiped on flush)
|
|
77
|
+
storage_accumulates: () => {
|
|
78
|
+
const st1 = enc(s0, initial)[1];
|
|
79
|
+
const st2 = enc(s1, st1)[1]; // flush [s0, s1]
|
|
80
|
+
const st3 = enc(s0, st2)[1];
|
|
81
|
+
const [, st4] = enc(s0, st3); // flush [s0, s0]
|
|
82
|
+
assertEq(st4[0].length, 2);
|
|
83
|
+
verifyStorage(st4[0]);
|
|
84
|
+
},
|
|
85
|
+
// Two consecutive words encode independently and correctly
|
|
86
|
+
two_words: () => {
|
|
87
|
+
const st1 = enc(s0, initial)[1];
|
|
88
|
+
const [r1, st2] = enc(s1, st1);
|
|
89
|
+
assertEq(r1, compress(s0, s1));
|
|
90
|
+
const st3 = enc(s0, st2)[1];
|
|
91
|
+
const [r2] = enc(s0, st3);
|
|
92
|
+
assertEq(r2, compress(s0, s0));
|
|
93
|
+
},
|
|
94
|
+
// Different words produce different hashes
|
|
95
|
+
non_commutative: () => {
|
|
96
|
+
const [out1] = runWord([s0, s1]);
|
|
97
|
+
const [out2] = runWord([s1, s0, s1]);
|
|
98
|
+
assert(out1 !== out2);
|
|
99
|
+
},
|
|
100
|
+
// Trie-internal merges have isSymbol=false; only the terminal merge has isSymbol=true
|
|
101
|
+
isSymbol_terminal_only: () => {
|
|
102
|
+
const [, storage] = runWord([s1, s0, s0]);
|
|
103
|
+
assert(storage[0][3] === false); // Patricia trie merge
|
|
104
|
+
assert(storage[1][3] === true); // terminal compress(root, t)
|
|
105
|
+
},
|
|
106
|
+
// Single-step word: no trie merges, exactly one isSymbol=true
|
|
107
|
+
isSymbol_min_word: () => {
|
|
108
|
+
const [, storage] = runWord([s0, s0]);
|
|
109
|
+
assertEq(storage.length, 1);
|
|
110
|
+
assert(storage[0][3] === true);
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bijective encoding between words of level-k symbols and single symbols of level k+1,
|
|
3
|
+
* for the first three literal SUL levels.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type Vec } from '../../../types/bit_vec/module.f.ts';
|
|
8
|
+
import type { Func } from '../../../types/function/module.f.ts';
|
|
9
|
+
import { type Equal, type StateScan } from '../../../types/function/operator/module.f.ts';
|
|
10
|
+
import { type List } from '../../../types/list/module.f.ts';
|
|
11
|
+
export declare const symbolToString: (s: bigint) => string;
|
|
12
|
+
export type Word = readonly bigint[];
|
|
13
|
+
export declare const wordToString: (word: List<bigint>) => string;
|
|
14
|
+
export declare const wordEqual: Equal<List<bigint>>;
|
|
15
|
+
/**
|
|
16
|
+
* Streaming encoder state: `[last, part]`.
|
|
17
|
+
* - `last` — the most recently consumed input symbol, or `undefined` before any symbol is seen.
|
|
18
|
+
* - `part` — accumulated index offset from the decreasing prefix consumed so far.
|
|
19
|
+
*/
|
|
20
|
+
export type EncodeState = readonly [bigint | undefined, bigint];
|
|
21
|
+
/** Initial encoder state: no symbols seen, zero offset. */
|
|
22
|
+
export declare const emptyEncodeState: EncodeState;
|
|
23
|
+
/**
|
|
24
|
+
* A literal SUL level with finite alphabet `[0, n)`.
|
|
25
|
+
*/
|
|
26
|
+
export type Level = {
|
|
27
|
+
/** Number of valid words whose first symbol is ≤ `i`. */
|
|
28
|
+
readonly sum: (i: bigint) => bigint;
|
|
29
|
+
/** Inverse of {@link Level.encode}: restores the complete word from a symbol. */
|
|
30
|
+
readonly decode: (i: bigint) => List<bigint>;
|
|
31
|
+
/** Streaming encoder: processes one input symbol at a time, emitting an output symbol only
|
|
32
|
+
* when the terminating symbol `t >= last` arrives. */
|
|
33
|
+
readonly encode: StateScan<bigint, EncodeState, bigint | undefined>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Creates a {@link Level} for alphabet size `n = 2^e + 1`.
|
|
37
|
+
*
|
|
38
|
+
* The first three levels for a tree starting from a binary alphabet:
|
|
39
|
+
*
|
|
40
|
+
* | `e` | `n` |
|
|
41
|
+
* |------|--------|
|
|
42
|
+
* | `0` | `2` |
|
|
43
|
+
* | `2` | `5` |
|
|
44
|
+
* | `7` | `0x81` |
|
|
45
|
+
*
|
|
46
|
+
* @param e `log2(n - 1)`
|
|
47
|
+
*/
|
|
48
|
+
export declare const level: (e: bigint) => Level;
|
|
49
|
+
/** Combined encoder state for the three-level literal pipeline (L1 → L2 → L3). */
|
|
50
|
+
export type PipelineState = readonly [EncodeState, EncodeState, EncodeState];
|
|
51
|
+
/** Initial state for the three-level literal pipeline. */
|
|
52
|
+
export declare const emptyPipelineState: PipelineState;
|
|
53
|
+
/**
|
|
54
|
+
* Advances the three-level literal pipeline by one bit.
|
|
55
|
+
* Returns a level-3 symbol whenever the pipeline emits, otherwise `undefined`.
|
|
56
|
+
*/
|
|
57
|
+
export declare const pipelineStep: StateScan<bigint, PipelineState, bigint | undefined>;
|
|
58
|
+
export type LiteralToVec = Func<bigint, Vec>;
|
|
59
|
+
/** Decodes a level-1 symbol to its canonical MSB bit vector. */
|
|
60
|
+
export declare const literal1ToVec: LiteralToVec;
|
|
61
|
+
/** Decodes a level-2 symbol to its canonical MSB bit vector (via level-1 decoding). */
|
|
62
|
+
export declare const literal2ToVec: LiteralToVec;
|
|
63
|
+
/** Decodes a level-3 symbol to its canonical MSB bit vector (via level-2 and level-1 decoding). */
|
|
64
|
+
export declare const literal3ToVec: LiteralToVec;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bijective encoding between words of level-k symbols and single symbols of level k+1,
|
|
3
|
+
* for the first three literal SUL levels.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { log2 } from "../../../types/bigint/module.f.js";
|
|
8
|
+
import { listToVec, msb, vec } from "../../../types/bit_vec/module.f.js";
|
|
9
|
+
import { strictEqual } from "../../../types/function/operator/module.f.js";
|
|
10
|
+
import { equal, map } from "../../../types/list/module.f.js";
|
|
11
|
+
import { join } from "../../../types/string/module.f.js";
|
|
12
|
+
export const symbolToString = (s) => s.toString(16);
|
|
13
|
+
export const wordToString = (word) => join(',')(map(symbolToString)(word));
|
|
14
|
+
export const wordEqual = equal(strictEqual);
|
|
15
|
+
/** Initial encoder state: no symbols seen, zero offset. */
|
|
16
|
+
export const emptyEncodeState = [undefined, 0n];
|
|
17
|
+
/**
|
|
18
|
+
* Creates a {@link Level} for alphabet size `n = 2^e + 1`.
|
|
19
|
+
*
|
|
20
|
+
* The first three levels for a tree starting from a binary alphabet:
|
|
21
|
+
*
|
|
22
|
+
* | `e` | `n` |
|
|
23
|
+
* |------|--------|
|
|
24
|
+
* | `0` | `2` |
|
|
25
|
+
* | `2` | `5` |
|
|
26
|
+
* | `7` | `0x81` |
|
|
27
|
+
*
|
|
28
|
+
* @param e `log2(n - 1)`
|
|
29
|
+
*/
|
|
30
|
+
export const level = (e) => {
|
|
31
|
+
// m = n - 1
|
|
32
|
+
const m = 1n << e;
|
|
33
|
+
const n = m + 1n;
|
|
34
|
+
// k = n - 2
|
|
35
|
+
const k = m - 1n;
|
|
36
|
+
// m2 = 2 * m
|
|
37
|
+
const m2 = m << 1n;
|
|
38
|
+
const e1 = e + 1n;
|
|
39
|
+
const sum = (i) => (m2 << i) + i - k;
|
|
40
|
+
const decode = (i) => () => {
|
|
41
|
+
const r = log2((i + k) >> e1);
|
|
42
|
+
const s0 = sum(r) > i ? r : r + 1n;
|
|
43
|
+
const s1 = i - sum(s0) + n;
|
|
44
|
+
return s1 >= s0 ? [s0, s1] : {
|
|
45
|
+
first: s0,
|
|
46
|
+
tail: decode(i - sum(s0 - 1n))
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
sum,
|
|
51
|
+
decode,
|
|
52
|
+
encode: (i, [last, part]) => last === undefined ? [undefined, [i, 0n]] :
|
|
53
|
+
last > i ? [undefined, [i, part + sum(last - 1n)]] :
|
|
54
|
+
[part + sum(last) + i - n, emptyEncodeState]
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
const l1 = level(0n);
|
|
58
|
+
const l2 = level(2n);
|
|
59
|
+
const l3 = level(7n);
|
|
60
|
+
/** Initial state for the three-level literal pipeline. */
|
|
61
|
+
export const emptyPipelineState = [emptyEncodeState, emptyEncodeState, emptyEncodeState];
|
|
62
|
+
/**
|
|
63
|
+
* Advances the three-level literal pipeline by one bit.
|
|
64
|
+
* Returns a level-3 symbol whenever the pipeline emits, otherwise `undefined`.
|
|
65
|
+
*/
|
|
66
|
+
export const pipelineStep = (bit, [l1s, l2s, l3s]) => {
|
|
67
|
+
const [l1Out, newL1s] = l1.encode(bit, l1s);
|
|
68
|
+
if (l1Out === undefined)
|
|
69
|
+
return [undefined, [newL1s, l2s, l3s]];
|
|
70
|
+
const [l2Out, newL2s] = l2.encode(l1Out, l2s);
|
|
71
|
+
if (l2Out === undefined)
|
|
72
|
+
return [undefined, [newL1s, newL2s, l3s]];
|
|
73
|
+
const [l3Out, newL3s] = l3.encode(l2Out, l3s);
|
|
74
|
+
return [l3Out, [newL1s, newL2s, newL3s]];
|
|
75
|
+
};
|
|
76
|
+
const concat = listToVec(msb);
|
|
77
|
+
const vec1 = vec(1n);
|
|
78
|
+
const literalToVec = (prior, e) => {
|
|
79
|
+
const m = map(prior);
|
|
80
|
+
const { decode } = level(e);
|
|
81
|
+
return literal => concat(m(decode(literal)));
|
|
82
|
+
};
|
|
83
|
+
/** Decodes a level-1 symbol to its canonical MSB bit vector. */
|
|
84
|
+
export const literal1ToVec = literalToVec(vec1, 0n);
|
|
85
|
+
/** Decodes a level-2 symbol to its canonical MSB bit vector (via level-1 decoding). */
|
|
86
|
+
export const literal2ToVec = literalToVec(literal1ToVec, 2n);
|
|
87
|
+
/** Decodes a level-3 symbol to its canonical MSB bit vector (via level-2 and level-1 decoding). */
|
|
88
|
+
export const literal3ToVec = literalToVec(literal2ToVec, 7n);
|