@elaraai/east 1.0.79 → 1.0.81
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 +1 -1
- package/dist/src/builtins.d.ts +1 -1
- package/dist/src/builtins.d.ts.map +1 -1
- package/dist/src/builtins.js +19 -0
- package/dist/src/builtins.js.map +1 -1
- package/dist/src/codegen/spellings.d.ts.map +1 -1
- package/dist/src/codegen/spellings.js +3 -0
- package/dist/src/codegen/spellings.js.map +1 -1
- package/dist/src/comparison.d.ts +54 -0
- package/dist/src/comparison.d.ts.map +1 -1
- package/dist/src/comparison.equivalent.spec.d.ts +6 -0
- package/dist/src/comparison.equivalent.spec.d.ts.map +1 -0
- package/dist/src/comparison.equivalent.spec.js +130 -0
- package/dist/src/comparison.equivalent.spec.js.map +1 -0
- package/dist/src/comparison.js +97 -25
- package/dist/src/comparison.js.map +1 -1
- package/dist/src/compile/builtins/array.d.ts +60 -0
- package/dist/src/compile/builtins/array.d.ts.map +1 -0
- package/dist/src/compile/builtins/array.js +691 -0
- package/dist/src/compile/builtins/array.js.map +1 -0
- package/dist/src/compile/builtins/blob.d.ts +18 -0
- package/dist/src/compile/builtins/blob.d.ts.map +1 -0
- package/dist/src/compile/builtins/blob.js +150 -0
- package/dist/src/compile/builtins/blob.js.map +1 -0
- package/dist/src/compile/builtins/compare.d.ts +18 -0
- package/dist/src/compile/builtins/compare.d.ts.map +1 -0
- package/dist/src/compile/builtins/compare.js +52 -0
- package/dist/src/compile/builtins/compare.js.map +1 -0
- package/dist/src/compile/builtins/datetime.d.ts +21 -0
- package/dist/src/compile/builtins/datetime.d.ts.map +1 -0
- package/dist/src/compile/builtins/datetime.js +46 -0
- package/dist/src/compile/builtins/datetime.js.map +1 -0
- package/dist/src/compile/builtins/dict.d.ts +47 -0
- package/dist/src/compile/builtins/dict.d.ts.map +1 -0
- package/dist/src/compile/builtins/dict.js +576 -0
- package/dist/src/compile/builtins/dict.js.map +1 -0
- package/dist/src/compile/builtins/index.d.ts +9 -0
- package/dist/src/compile/builtins/index.d.ts.map +1 -0
- package/dist/src/compile/builtins/index.js +28 -0
- package/dist/src/compile/builtins/index.js.map +1 -0
- package/dist/src/compile/builtins/matrix.d.ts +31 -0
- package/dist/src/compile/builtins/matrix.d.ts.map +1 -0
- package/dist/src/compile/builtins/matrix.js +310 -0
- package/dist/src/compile/builtins/matrix.js.map +1 -0
- package/dist/src/compile/builtins/primitives.d.ts +36 -0
- package/dist/src/compile/builtins/primitives.d.ts.map +1 -0
- package/dist/src/compile/builtins/primitives.js +67 -0
- package/dist/src/compile/builtins/primitives.js.map +1 -0
- package/dist/src/compile/builtins/ref.d.ts +11 -0
- package/dist/src/compile/builtins/ref.d.ts.map +1 -0
- package/dist/src/compile/builtins/ref.js +30 -0
- package/dist/src/compile/builtins/ref.js.map +1 -0
- package/dist/src/compile/builtins/set.d.ts +42 -0
- package/dist/src/compile/builtins/set.d.ts.map +1 -0
- package/dist/src/compile/builtins/set.js +410 -0
- package/dist/src/compile/builtins/set.js.map +1 -0
- package/dist/src/compile/builtins/sparse.d.ts +19 -0
- package/dist/src/compile/builtins/sparse.d.ts.map +1 -0
- package/dist/src/compile/builtins/sparse.js +143 -0
- package/dist/src/compile/builtins/sparse.js.map +1 -0
- package/dist/src/compile/builtins/string.d.ts +34 -0
- package/dist/src/compile/builtins/string.d.ts.map +1 -0
- package/dist/src/compile/builtins/string.js +238 -0
- package/dist/src/compile/builtins/string.js.map +1 -0
- package/dist/src/compile/builtins/tree.d.ts +32 -0
- package/dist/src/compile/builtins/tree.d.ts.map +1 -0
- package/dist/src/compile/builtins/tree.js +108 -0
- package/dist/src/compile/builtins/tree.js.map +1 -0
- package/dist/src/compile/builtins/vector.d.ts +44 -0
- package/dist/src/compile/builtins/vector.d.ts.map +1 -0
- package/dist/src/compile/builtins/vector.js +463 -0
- package/dist/src/compile/builtins/vector.js.map +1 -0
- package/dist/src/compile/constructors.d.ts +13 -0
- package/dist/src/compile/constructors.d.ts.map +1 -0
- package/dist/src/compile/constructors.js +179 -0
- package/dist/src/compile/constructors.js.map +1 -0
- package/dist/src/compile/control.d.ts +13 -0
- package/dist/src/compile/control.d.ts.map +1 -0
- package/dist/src/compile/control.js +513 -0
- package/dist/src/compile/control.js.map +1 -0
- package/dist/src/compile/functions.d.ts +13 -0
- package/dist/src/compile/functions.d.ts.map +1 -0
- package/dist/src/compile/functions.js +492 -0
- package/dist/src/compile/functions.js.map +1 -0
- package/dist/src/compile/ir.d.ts +19 -0
- package/dist/src/compile/ir.d.ts.map +1 -0
- package/dist/src/compile/ir.js +193 -0
- package/dist/src/compile/ir.js.map +1 -0
- package/dist/src/compile/runtime.d.ts +75 -0
- package/dist/src/compile/runtime.d.ts.map +1 -0
- package/dist/src/compile/runtime.js +114 -0
- package/dist/src/compile/runtime.js.map +1 -0
- package/dist/src/compile/type_parameters.d.ts +4 -0
- package/dist/src/compile/type_parameters.d.ts.map +1 -0
- package/dist/src/compile/type_parameters.js +55 -0
- package/dist/src/compile/type_parameters.js.map +1 -0
- package/dist/src/compile/typed_arrays.d.ts +28 -0
- package/dist/src/compile/typed_arrays.d.ts.map +1 -0
- package/dist/src/compile/typed_arrays.js +77 -0
- package/dist/src/compile/typed_arrays.js.map +1 -0
- package/dist/src/compile.d.ts +6 -41
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +8 -4415
- package/dist/src/compile.js.map +1 -1
- package/dist/src/compile.open_beast.spec.js +5 -4
- package/dist/src/compile.open_beast.spec.js.map +1 -1
- package/dist/src/compile.signature.spec.d.ts +6 -0
- package/dist/src/compile.signature.spec.d.ts.map +1 -0
- package/dist/src/compile.signature.spec.js +53 -0
- package/dist/src/compile.signature.spec.js.map +1 -0
- package/dist/src/containers/sortedmap.d.ts +2 -1
- package/dist/src/containers/sortedmap.d.ts.map +1 -1
- package/dist/src/containers/sortedmap.js +4 -2
- package/dist/src/containers/sortedmap.js.map +1 -1
- package/dist/src/containers/sortedset.d.ts +2 -1
- package/dist/src/containers/sortedset.d.ts.map +1 -1
- package/dist/src/containers/sortedset.js +4 -2
- package/dist/src/containers/sortedset.js.map +1 -1
- package/dist/src/error.d.ts +15 -0
- package/dist/src/error.d.ts.map +1 -1
- package/dist/src/error.js +16 -0
- package/dist/src/error.js.map +1 -1
- package/dist/src/expr/array.d.ts +158 -81
- package/dist/src/expr/array.d.ts.map +1 -1
- package/dist/src/expr/array.js +68 -51
- package/dist/src/expr/array.js.map +1 -1
- package/dist/src/expr/ast.d.ts.map +1 -1
- package/dist/src/expr/ast.js +13 -0
- package/dist/src/expr/ast.js.map +1 -1
- package/dist/src/expr/blob.d.ts +8 -8
- package/dist/src/expr/blob.js +8 -8
- package/dist/src/expr/block.d.ts +18 -5
- package/dist/src/expr/block.d.ts.map +1 -1
- package/dist/src/expr/block.js +19 -0
- package/dist/src/expr/block.js.map +1 -1
- package/dist/src/expr/boolean.d.ts +10 -10
- package/dist/src/expr/boolean.js +10 -10
- package/dist/src/expr/datetime.d.ts +28 -28
- package/dist/src/expr/datetime.js +28 -28
- package/dist/src/expr/dict.d.ts +101 -51
- package/dist/src/expr/dict.d.ts.map +1 -1
- package/dist/src/expr/dict.js +97 -36
- package/dist/src/expr/dict.js.map +1 -1
- package/dist/src/expr/float.d.ts +23 -23
- package/dist/src/expr/float.js +23 -23
- package/dist/src/expr/integer.d.ts +17 -17
- package/dist/src/expr/integer.js +11 -11
- package/dist/src/expr/libs/array.d.ts +6 -6
- package/dist/src/expr/libs/array.js +6 -6
- package/dist/src/expr/libs/blob.d.ts +2 -2
- package/dist/src/expr/libs/blob.js +2 -2
- package/dist/src/expr/libs/datetime.d.ts +25 -25
- package/dist/src/expr/libs/datetime.js +25 -25
- package/dist/src/expr/libs/dict.d.ts +2 -2
- package/dist/src/expr/libs/dict.js +2 -2
- package/dist/src/expr/libs/float.d.ts +15 -15
- package/dist/src/expr/libs/float.js +15 -15
- package/dist/src/expr/libs/integer.d.ts +12 -12
- package/dist/src/expr/libs/integer.js +12 -12
- package/dist/src/expr/libs/set.d.ts +2 -2
- package/dist/src/expr/libs/set.js +2 -2
- package/dist/src/expr/libs/string.d.ts +4 -4
- package/dist/src/expr/libs/string.js +4 -4
- package/dist/src/expr/recursive.d.ts +22 -5
- package/dist/src/expr/recursive.d.ts.map +1 -1
- package/dist/src/expr/recursive.js +22 -5
- package/dist/src/expr/recursive.js.map +1 -1
- package/dist/src/expr/ref.d.ts +5 -5
- package/dist/src/expr/ref.js +5 -5
- package/dist/src/expr/set.d.ts +96 -51
- package/dist/src/expr/set.d.ts.map +1 -1
- package/dist/src/expr/set.js +85 -29
- package/dist/src/expr/set.js.map +1 -1
- package/dist/src/expr/string.d.ts +28 -28
- package/dist/src/expr/string.js +28 -28
- package/dist/src/expr/struct.d.ts.map +1 -1
- package/dist/src/expr/struct.js +2 -2
- package/dist/src/expr/variant.d.ts +12 -12
- package/dist/src/expr/variant.js +7 -7
- package/dist/src/function_symbols.d.ts +28 -0
- package/dist/src/function_symbols.d.ts.map +1 -0
- package/dist/src/function_symbols.js +28 -0
- package/dist/src/function_symbols.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/location.d.ts +32 -0
- package/dist/src/location.d.ts.map +1 -1
- package/dist/src/location.js +38 -0
- package/dist/src/location.js.map +1 -1
- package/dist/src/location.spec.js +89 -1
- package/dist/src/location.spec.js.map +1 -1
- package/dist/src/patch/index.d.ts +1 -1
- package/dist/src/patch/index.d.ts.map +1 -1
- package/dist/src/patch/index.js +1 -1
- package/dist/src/patch/index.js.map +1 -1
- package/dist/src/patch/type_of_patch.d.ts +25 -1
- package/dist/src/patch/type_of_patch.d.ts.map +1 -1
- package/dist/src/patch/type_of_patch.js +33 -10
- package/dist/src/patch/type_of_patch.js.map +1 -1
- package/dist/src/platform.spec.js +19 -1
- package/dist/src/platform.spec.js.map +1 -1
- package/dist/src/runner_protocol.d.ts +357 -0
- package/dist/src/runner_protocol.d.ts.map +1 -0
- package/dist/src/runner_protocol.js +154 -0
- package/dist/src/runner_protocol.js.map +1 -0
- package/dist/src/serialization/beast2/index.d.ts +22 -5
- package/dist/src/serialization/beast2/index.d.ts.map +1 -1
- package/dist/src/serialization/beast2/index.js +13 -2
- package/dist/src/serialization/beast2/index.js.map +1 -1
- package/dist/src/serialization/beast2/index.spec.js +84 -3
- package/dist/src/serialization/beast2/index.spec.js.map +1 -1
- package/dist/src/serialization/beast2/shared.d.ts +32 -3
- package/dist/src/serialization/beast2/shared.d.ts.map +1 -1
- package/dist/src/serialization/beast2/shared.js +135 -10
- package/dist/src/serialization/beast2/shared.js.map +1 -1
- package/dist/src/serialization/beast2/v4/container.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v4/container.js +5 -3
- package/dist/src/serialization/beast2/v4/container.js.map +1 -1
- package/dist/src/serialization/beast2/v5/aliasing.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/aliasing.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/aliasing.spec.js +75 -0
- package/dist/src/serialization/beast2/v5/aliasing.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/boundary.d.ts +176 -0
- package/dist/src/serialization/beast2/v5/boundary.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/boundary.js +297 -0
- package/dist/src/serialization/beast2/v5/boundary.js.map +1 -0
- package/dist/src/serialization/beast2/v5/boundary.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/boundary.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/boundary.spec.js +479 -0
- package/dist/src/serialization/beast2/v5/boundary.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.d.ts +101 -0
- package/dist/src/serialization/beast2/v5/canonical.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.js +436 -0
- package/dist/src/serialization/beast2/v5/canonical.js.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.js +124 -0
- package/dist/src/serialization/beast2/v5/canonical.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/codec.d.ts +6 -5
- package/dist/src/serialization/beast2/v5/codec.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/codec.js +18 -3
- package/dist/src/serialization/beast2/v5/codec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/deflate.d.ts +24 -2
- package/dist/src/serialization/beast2/v5/deflate.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/deflate.js +47 -12
- package/dist/src/serialization/beast2/v5/deflate.js.map +1 -1
- package/dist/src/serialization/beast2/v5/deflate.spec.js +15 -1
- package/dist/src/serialization/beast2/v5/deflate.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/elements.d.ts +66 -0
- package/dist/src/serialization/beast2/v5/elements.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/elements.js +325 -0
- package/dist/src/serialization/beast2/v5/elements.js.map +1 -0
- package/dist/src/serialization/beast2/v5/elements.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/elements.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/elements.spec.js +161 -0
- package/dist/src/serialization/beast2/v5/elements.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/frame-pool.d.ts +62 -21
- package/dist/src/serialization/beast2/v5/frame-pool.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/frame-pool.js +138 -27
- package/dist/src/serialization/beast2/v5/frame-pool.js.map +1 -1
- package/dist/src/serialization/beast2/v5/frame-pool.spec.js +198 -71
- package/dist/src/serialization/beast2/v5/frame-pool.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/frame-worker.js +25 -15
- package/dist/src/serialization/beast2/v5/frame-worker.js.map +1 -1
- package/dist/src/serialization/beast2/v5/frames.d.ts +22 -12
- package/dist/src/serialization/beast2/v5/frames.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/frames.js +52 -27
- package/dist/src/serialization/beast2/v5/frames.js.map +1 -1
- package/dist/src/serialization/beast2/v5/geometry.d.ts +38 -1
- package/dist/src/serialization/beast2/v5/geometry.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/geometry.js +73 -1
- package/dist/src/serialization/beast2/v5/geometry.js.map +1 -1
- package/dist/src/serialization/beast2/v5/geometry.spec.js +34 -23
- package/dist/src/serialization/beast2/v5/geometry.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/index.spec.js +32 -28
- package/dist/src/serialization/beast2/v5/index.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/intake.d.ts +98 -0
- package/dist/src/serialization/beast2/v5/intake.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.js +462 -0
- package/dist/src/serialization/beast2/v5/intake.js.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/intake.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/intake.spec.js +202 -0
- package/dist/src/serialization/beast2/v5/intake.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/lazy.d.ts +42 -1
- package/dist/src/serialization/beast2/v5/lazy.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/lazy.js +143 -28
- package/dist/src/serialization/beast2/v5/lazy.js.map +1 -1
- package/dist/src/serialization/beast2/v5/lazy.spec.js +102 -24
- package/dist/src/serialization/beast2/v5/lazy.spec.js.map +1 -1
- package/dist/src/serialization/beast2/v5/manifest-writer.d.ts +110 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.js +118 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.js.map +1 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.spec.js +207 -0
- package/dist/src/serialization/beast2/v5/manifest-writer.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/manifest.d.ts +241 -0
- package/dist/src/serialization/beast2/v5/manifest.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/manifest.js +233 -0
- package/dist/src/serialization/beast2/v5/manifest.js.map +1 -0
- package/dist/src/serialization/beast2/v5/merge.d.ts +93 -0
- package/dist/src/serialization/beast2/v5/merge.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/merge.js +202 -0
- package/dist/src/serialization/beast2/v5/merge.js.map +1 -0
- package/dist/src/serialization/beast2/v5/merge.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/merge.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/merge.spec.js +118 -0
- package/dist/src/serialization/beast2/v5/merge.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/recut.d.ts +143 -0
- package/dist/src/serialization/beast2/v5/recut.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/recut.js +365 -0
- package/dist/src/serialization/beast2/v5/recut.js.map +1 -0
- package/dist/src/serialization/beast2/v5/recut.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/recut.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/recut.spec.js +215 -0
- package/dist/src/serialization/beast2/v5/recut.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.d.ts +148 -0
- package/dist/src/serialization/beast2/v5/runs.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.js +260 -0
- package/dist/src/serialization/beast2/v5/runs.js.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/runs.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/runs.spec.js +182 -0
- package/dist/src/serialization/beast2/v5/runs.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/sha256.d.ts +19 -0
- package/dist/src/serialization/beast2/v5/sha256.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/sha256.js +103 -0
- package/dist/src/serialization/beast2/v5/sha256.js.map +1 -0
- package/dist/src/serialization/beast2/v5/sha256.spec.d.ts +6 -0
- package/dist/src/serialization/beast2/v5/sha256.spec.d.ts.map +1 -0
- package/dist/src/serialization/beast2/v5/sha256.spec.js +42 -0
- package/dist/src/serialization/beast2/v5/sha256.spec.js.map +1 -0
- package/dist/src/serialization/beast2/v5/stream.d.ts +273 -86
- package/dist/src/serialization/beast2/v5/stream.d.ts.map +1 -1
- package/dist/src/serialization/beast2/v5/stream.js +576 -244
- package/dist/src/serialization/beast2/v5/stream.js.map +1 -1
- package/dist/src/serialization/beast2/v5/sync-reader.spec.js +24 -10
- package/dist/src/serialization/beast2/v5/sync-reader.spec.js.map +1 -1
- package/dist/src/serialization/index.d.ts +1 -1
- package/dist/src/serialization/index.d.ts.map +1 -1
- package/dist/src/serialization/index.js +1 -1
- package/dist/src/serialization/index.js.map +1 -1
- package/dist/src/serialization/json.d.ts +28 -0
- package/dist/src/serialization/json.d.ts.map +1 -1
- package/dist/src/serialization/json.js +141 -30
- package/dist/src/serialization/json.js.map +1 -1
- package/dist/src/serialization/json.spec.js +47 -2
- package/dist/src/serialization/json.spec.js.map +1 -1
- package/dist/src/serialization/json_schema.d.ts +15 -11
- package/dist/src/serialization/json_schema.d.ts.map +1 -1
- package/dist/src/serialization/json_schema.js +21 -36
- package/dist/src/serialization/json_schema.js.map +1 -1
- package/dist/src/serialization/json_schema.spec.js +26 -32
- package/dist/src/serialization/json_schema.spec.js.map +1 -1
- package/dist/src/serialization/json_schema_to_type.d.ts +10 -5
- package/dist/src/serialization/json_schema_to_type.d.ts.map +1 -1
- package/dist/src/serialization/json_schema_to_type.js +13 -6
- package/dist/src/serialization/json_schema_to_type.js.map +1 -1
- package/dist/src/serialization/json_schema_to_type.spec.js +19 -0
- package/dist/src/serialization/json_schema_to_type.spec.js.map +1 -1
- package/dist/src/string_order.d.ts +36 -0
- package/dist/src/string_order.d.ts.map +1 -0
- package/dist/src/string_order.js +64 -0
- package/dist/src/string_order.js.map +1 -0
- package/dist/src/string_order.spec.d.ts +6 -0
- package/dist/src/string_order.spec.d.ts.map +1 -0
- package/dist/src/string_order.spec.js +79 -0
- package/dist/src/string_order.spec.js.map +1 -0
- package/dist/src/type_of_type.d.ts +17 -0
- package/dist/src/type_of_type.d.ts.map +1 -1
- package/dist/src/type_of_type.js +66 -0
- package/dist/src/type_of_type.js.map +1 -1
- package/dist/src/type_of_type.to_etv.spec.js +69 -1
- package/dist/src/type_of_type.to_etv.spec.js.map +1 -1
- package/package.json +1 -1
|
@@ -54,7 +54,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
54
54
|
* const parseInteger = East.function([StringType], IntegerType, ($, text) => {
|
|
55
55
|
* $.return(text.parse(IntegerType));
|
|
56
56
|
* });
|
|
57
|
-
* const compiled = East.compile(parseInteger
|
|
57
|
+
* const compiled = East.compile(parseInteger, []);
|
|
58
58
|
* compiled("42"); // 42n
|
|
59
59
|
* compiled("-100"); // -100n
|
|
60
60
|
* // compiled("3.14") would throw error (not an integer format)
|
|
@@ -74,7 +74,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
74
74
|
* const parseJsonArray = East.function([StringType], ArrayType(IntegerType), ($, json) => {
|
|
75
75
|
* $.return(json.parseJson(ArrayType(IntegerType)));
|
|
76
76
|
* });
|
|
77
|
-
* const compiled = East.compile(parseJsonArray
|
|
77
|
+
* const compiled = East.compile(parseJsonArray, []);
|
|
78
78
|
* compiled("[1, 2, 3]"); // [1n, 2n, 3n]
|
|
79
79
|
* compiled("[]"); // []
|
|
80
80
|
* // compiled("{\"a\": 1}") would throw error (not an array)
|
|
@@ -92,7 +92,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
92
92
|
* const joinStrings = East.function([StringType, StringType], StringType, ($, a, b) => {
|
|
93
93
|
* $.return(a.concat(b));
|
|
94
94
|
* });
|
|
95
|
-
* const compiled = East.compile(joinStrings
|
|
95
|
+
* const compiled = East.compile(joinStrings, []);
|
|
96
96
|
* compiled("Hello, ", "World!"); // "Hello, World!"
|
|
97
97
|
* compiled("foo", "bar"); // "foobar"
|
|
98
98
|
* compiled("", "test"); // "test"
|
|
@@ -110,7 +110,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
110
110
|
* const repeatString = East.function([StringType, IntegerType], StringType, ($, str, n) => {
|
|
111
111
|
* $.return(str.repeat(n));
|
|
112
112
|
* });
|
|
113
|
-
* const compiled = East.compile(repeatString
|
|
113
|
+
* const compiled = East.compile(repeatString, []);
|
|
114
114
|
* compiled("abc", 3n); // "abcabcabc"
|
|
115
115
|
* compiled("x", 5n); // "xxxxx"
|
|
116
116
|
* compiled("test", 0n); // ""
|
|
@@ -128,7 +128,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
128
128
|
* const getLength = East.function([StringType], IntegerType, ($, str) => {
|
|
129
129
|
* $.return(str.length());
|
|
130
130
|
* });
|
|
131
|
-
* const compiled = East.compile(getLength
|
|
131
|
+
* const compiled = East.compile(getLength, []);
|
|
132
132
|
* compiled("hello"); // 5n
|
|
133
133
|
* compiled(""); // 0n
|
|
134
134
|
* compiled("😀🎉"); // 2n (2 emoji code points)
|
|
@@ -149,7 +149,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
149
149
|
* const substr = East.function([StringType, IntegerType, IntegerType], StringType, ($, str, start, end) => {
|
|
150
150
|
* $.return(str.substring(start, end));
|
|
151
151
|
* });
|
|
152
|
-
* const compiled = East.compile(substr
|
|
152
|
+
* const compiled = East.compile(substr, []);
|
|
153
153
|
* compiled("hello world", 0n, 5n); // "hello"
|
|
154
154
|
* compiled("hello world", 6n, 11n); // "world"
|
|
155
155
|
* compiled("test", 1n, 3n); // "es"
|
|
@@ -166,7 +166,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
166
166
|
* const toUpper = East.function([StringType], StringType, ($, str) => {
|
|
167
167
|
* $.return(str.upperCase());
|
|
168
168
|
* });
|
|
169
|
-
* const compiled = East.compile(toUpper
|
|
169
|
+
* const compiled = East.compile(toUpper, []);
|
|
170
170
|
* compiled("hello"); // "HELLO"
|
|
171
171
|
* compiled("Hello World"); // "HELLO WORLD"
|
|
172
172
|
* compiled("test123"); // "TEST123"
|
|
@@ -183,7 +183,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
183
183
|
* const toLower = East.function([StringType], StringType, ($, str) => {
|
|
184
184
|
* $.return(str.lowerCase());
|
|
185
185
|
* });
|
|
186
|
-
* const compiled = East.compile(toLower
|
|
186
|
+
* const compiled = East.compile(toLower, []);
|
|
187
187
|
* compiled("HELLO"); // "hello"
|
|
188
188
|
* compiled("Hello World"); // "hello world"
|
|
189
189
|
* compiled("TEST123"); // "test123"
|
|
@@ -201,7 +201,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
201
201
|
* const splitString = East.function([StringType, StringType], ArrayType(StringType), ($, str, delim) => {
|
|
202
202
|
* $.return(str.split(delim));
|
|
203
203
|
* });
|
|
204
|
-
* const compiled = East.compile(splitString
|
|
204
|
+
* const compiled = East.compile(splitString, []);
|
|
205
205
|
* compiled("a,b,c", ","); // ["a", "b", "c"]
|
|
206
206
|
* compiled("hello world", " "); // ["hello", "world"]
|
|
207
207
|
* compiled("one", ","); // ["one"]
|
|
@@ -219,7 +219,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
219
219
|
* const trimString = East.function([StringType], StringType, ($, str) => {
|
|
220
220
|
* $.return(str.trim());
|
|
221
221
|
* });
|
|
222
|
-
* const compiled = East.compile(trimString
|
|
222
|
+
* const compiled = East.compile(trimString, []);
|
|
223
223
|
* compiled(" hello "); // "hello"
|
|
224
224
|
* compiled("test\n"); // "test"
|
|
225
225
|
* compiled(" "); // ""
|
|
@@ -237,7 +237,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
237
237
|
* const trimLeft = East.function([StringType], StringType, ($, str) => {
|
|
238
238
|
* $.return(str.trimStart());
|
|
239
239
|
* });
|
|
240
|
-
* const compiled = East.compile(trimLeft
|
|
240
|
+
* const compiled = East.compile(trimLeft, []);
|
|
241
241
|
* compiled(" hello"); // "hello"
|
|
242
242
|
* compiled("\ttest"); // "test"
|
|
243
243
|
* compiled(" hello "); // "hello "
|
|
@@ -254,7 +254,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
254
254
|
* const trimRight = East.function([StringType], StringType, ($, str) => {
|
|
255
255
|
* $.return(str.trimEnd());
|
|
256
256
|
* });
|
|
257
|
-
* const compiled = East.compile(trimRight
|
|
257
|
+
* const compiled = East.compile(trimRight, []);
|
|
258
258
|
* compiled("hello "); // "hello"
|
|
259
259
|
* compiled("test\n"); // "test"
|
|
260
260
|
* compiled(" hello "); // " hello"
|
|
@@ -272,7 +272,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
272
272
|
* const checkPrefix = East.function([StringType, StringType], BooleanType, ($, str, prefix) => {
|
|
273
273
|
* $.return(str.startsWith(prefix));
|
|
274
274
|
* });
|
|
275
|
-
* const compiled = East.compile(checkPrefix
|
|
275
|
+
* const compiled = East.compile(checkPrefix, []);
|
|
276
276
|
* compiled("hello world", "hello"); // true
|
|
277
277
|
* compiled("test", "te"); // true
|
|
278
278
|
* compiled("hello", "world"); // false
|
|
@@ -291,7 +291,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
291
291
|
* const checkSuffix = East.function([StringType, StringType], BooleanType, ($, str, suffix) => {
|
|
292
292
|
* $.return(str.endsWith(suffix));
|
|
293
293
|
* });
|
|
294
|
-
* const compiled = East.compile(checkSuffix
|
|
294
|
+
* const compiled = East.compile(checkSuffix, []);
|
|
295
295
|
* compiled("hello world", "world"); // true
|
|
296
296
|
* compiled("test", "st"); // true
|
|
297
297
|
* compiled("hello", "world"); // false
|
|
@@ -310,7 +310,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
310
310
|
* const hasSubstring = East.function([StringType, StringType], BooleanType, ($, str, substr) => {
|
|
311
311
|
* $.return(str.contains(substr));
|
|
312
312
|
* });
|
|
313
|
-
* const compiled = East.compile(hasSubstring
|
|
313
|
+
* const compiled = East.compile(hasSubstring, []);
|
|
314
314
|
* compiled("hello world", "world"); // true
|
|
315
315
|
* compiled("test", "xyz"); // false
|
|
316
316
|
*
|
|
@@ -318,7 +318,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
318
318
|
* const hasDigits = East.function([StringType], BooleanType, ($, str) => {
|
|
319
319
|
* $.return(str.contains(/\d+/));
|
|
320
320
|
* });
|
|
321
|
-
* compiled = East.compile(hasDigits
|
|
321
|
+
* compiled = East.compile(hasDigits, []);
|
|
322
322
|
* compiled("test123"); // true
|
|
323
323
|
* compiled("test"); // false
|
|
324
324
|
* ```
|
|
@@ -335,7 +335,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
335
335
|
* const findIndex = East.function([StringType, StringType], IntegerType, ($, str, substr) => {
|
|
336
336
|
* $.return(str.indexOf(substr));
|
|
337
337
|
* });
|
|
338
|
-
* const compiled = East.compile(findIndex
|
|
338
|
+
* const compiled = East.compile(findIndex, []);
|
|
339
339
|
* compiled("hello world", "world"); // 6n
|
|
340
340
|
* compiled("test", "t"); // 0n
|
|
341
341
|
* compiled("hello", "xyz"); // -1n
|
|
@@ -344,7 +344,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
344
344
|
* const findDigit = East.function([StringType], IntegerType, ($, str) => {
|
|
345
345
|
* $.return(str.indexOf(/\d/));
|
|
346
346
|
* });
|
|
347
|
-
* compiled = East.compile(findDigit
|
|
347
|
+
* compiled = East.compile(findDigit, []);
|
|
348
348
|
* compiled("abc123"); // 3n
|
|
349
349
|
* ```
|
|
350
350
|
*/
|
|
@@ -361,7 +361,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
361
361
|
* const replaceAll = East.function([StringType, StringType, StringType], StringType, ($, str, search, replace) => {
|
|
362
362
|
* $.return(str.replace(search, replace));
|
|
363
363
|
* });
|
|
364
|
-
* const compiled = East.compile(replaceAll
|
|
364
|
+
* const compiled = East.compile(replaceAll, []);
|
|
365
365
|
* compiled("hello hello", "hello", "hi"); // "hi hi"
|
|
366
366
|
* compiled("test_test_value", "test", "prod"); // "prod_prod_value"
|
|
367
367
|
*
|
|
@@ -369,7 +369,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
369
369
|
* const swapWords = East.function([StringType], StringType, ($, str) => {
|
|
370
370
|
* $.return(str.replace(/(\w+) (\w+)/, "$2 $1"));
|
|
371
371
|
* });
|
|
372
|
-
* compiled = East.compile(swapWords
|
|
372
|
+
* compiled = East.compile(swapWords, []);
|
|
373
373
|
* compiled("hello world"); // "world hello"
|
|
374
374
|
* ```
|
|
375
375
|
*/
|
|
@@ -386,7 +386,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
386
386
|
* const encodeUtf8 = East.function([StringType], BlobType, ($, str) => {
|
|
387
387
|
* $.return(str.encodeUtf8());
|
|
388
388
|
* });
|
|
389
|
-
* const compiled = East.compile(encodeUtf8
|
|
389
|
+
* const compiled = East.compile(encodeUtf8, []);
|
|
390
390
|
* compiled("hello"); // Blob with UTF-8 bytes
|
|
391
391
|
* compiled("😀"); // Blob with UTF-8 encoded emoji
|
|
392
392
|
* ```
|
|
@@ -404,7 +404,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
404
404
|
* const encodeUtf16 = East.function([StringType], BlobType, ($, str) => {
|
|
405
405
|
* $.return(str.encodeUtf16());
|
|
406
406
|
* });
|
|
407
|
-
* const compiled = East.compile(encodeUtf16
|
|
407
|
+
* const compiled = East.compile(encodeUtf16, []);
|
|
408
408
|
* compiled("hello"); // Blob with UTF-16 LE bytes + BOM
|
|
409
409
|
* compiled("😀"); // Blob with UTF-16 encoded emoji
|
|
410
410
|
* ```
|
|
@@ -421,7 +421,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
421
421
|
* const isEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
422
422
|
* $.return(a.equals(b));
|
|
423
423
|
* });
|
|
424
|
-
* const compiled = East.compile(isEqual
|
|
424
|
+
* const compiled = East.compile(isEqual, []);
|
|
425
425
|
* compiled("hello", "hello"); // true
|
|
426
426
|
* compiled("hello", "world"); // false
|
|
427
427
|
* ```
|
|
@@ -438,7 +438,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
438
438
|
* const isNotEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
439
439
|
* $.return(a.notEquals(b));
|
|
440
440
|
* });
|
|
441
|
-
* const compiled = East.compile(isNotEqual
|
|
441
|
+
* const compiled = East.compile(isNotEqual, []);
|
|
442
442
|
* compiled("hello", "world"); // true
|
|
443
443
|
* compiled("hello", "hello"); // false
|
|
444
444
|
* ```
|
|
@@ -455,7 +455,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
455
455
|
* const isGreater = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
456
456
|
* $.return(a.greaterThan(b));
|
|
457
457
|
* });
|
|
458
|
-
* const compiled = East.compile(isGreater
|
|
458
|
+
* const compiled = East.compile(isGreater, []);
|
|
459
459
|
* compiled("b", "a"); // true
|
|
460
460
|
* compiled("a", "b"); // false
|
|
461
461
|
* compiled("a", "a"); // false
|
|
@@ -473,7 +473,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
473
473
|
* const isLess = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
474
474
|
* $.return(a.lessThan(b));
|
|
475
475
|
* });
|
|
476
|
-
* const compiled = East.compile(isLess
|
|
476
|
+
* const compiled = East.compile(isLess, []);
|
|
477
477
|
* compiled("a", "b"); // true
|
|
478
478
|
* compiled("b", "a"); // false
|
|
479
479
|
* compiled("a", "a"); // false
|
|
@@ -491,7 +491,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
491
491
|
* const isGreaterOrEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
492
492
|
* $.return(a.greaterThanOrEqual(b));
|
|
493
493
|
* });
|
|
494
|
-
* const compiled = East.compile(isGreaterOrEqual
|
|
494
|
+
* const compiled = East.compile(isGreaterOrEqual, []);
|
|
495
495
|
* compiled("b", "a"); // true
|
|
496
496
|
* compiled("a", "a"); // true
|
|
497
497
|
* compiled("a", "b"); // false
|
|
@@ -509,7 +509,7 @@ export declare class StringExpr extends Expr<StringType> {
|
|
|
509
509
|
* const isLessOrEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
510
510
|
* $.return(a.lessThanOrEqual(b));
|
|
511
511
|
* });
|
|
512
|
-
* const compiled = East.compile(isLessOrEqual
|
|
512
|
+
* const compiled = East.compile(isLessOrEqual, []);
|
|
513
513
|
* compiled("a", "b"); // true
|
|
514
514
|
* compiled("a", "a"); // true
|
|
515
515
|
* compiled("b", "a"); // false
|
package/dist/src/expr/string.js
CHANGED
|
@@ -51,7 +51,7 @@ export class StringExpr extends Expr {
|
|
|
51
51
|
* const parseInteger = East.function([StringType], IntegerType, ($, text) => {
|
|
52
52
|
* $.return(text.parse(IntegerType));
|
|
53
53
|
* });
|
|
54
|
-
* const compiled = East.compile(parseInteger
|
|
54
|
+
* const compiled = East.compile(parseInteger, []);
|
|
55
55
|
* compiled("42"); // 42n
|
|
56
56
|
* compiled("-100"); // -100n
|
|
57
57
|
* // compiled("3.14") would throw error (not an integer format)
|
|
@@ -83,7 +83,7 @@ export class StringExpr extends Expr {
|
|
|
83
83
|
* const parseJsonArray = East.function([StringType], ArrayType(IntegerType), ($, json) => {
|
|
84
84
|
* $.return(json.parseJson(ArrayType(IntegerType)));
|
|
85
85
|
* });
|
|
86
|
-
* const compiled = East.compile(parseJsonArray
|
|
86
|
+
* const compiled = East.compile(parseJsonArray, []);
|
|
87
87
|
* compiled("[1, 2, 3]"); // [1n, 2n, 3n]
|
|
88
88
|
* compiled("[]"); // []
|
|
89
89
|
* // compiled("{\"a\": 1}") would throw error (not an array)
|
|
@@ -110,7 +110,7 @@ export class StringExpr extends Expr {
|
|
|
110
110
|
* const joinStrings = East.function([StringType, StringType], StringType, ($, a, b) => {
|
|
111
111
|
* $.return(a.concat(b));
|
|
112
112
|
* });
|
|
113
|
-
* const compiled = East.compile(joinStrings
|
|
113
|
+
* const compiled = East.compile(joinStrings, []);
|
|
114
114
|
* compiled("Hello, ", "World!"); // "Hello, World!"
|
|
115
115
|
* compiled("foo", "bar"); // "foobar"
|
|
116
116
|
* compiled("", "test"); // "test"
|
|
@@ -138,7 +138,7 @@ export class StringExpr extends Expr {
|
|
|
138
138
|
* const repeatString = East.function([StringType, IntegerType], StringType, ($, str, n) => {
|
|
139
139
|
* $.return(str.repeat(n));
|
|
140
140
|
* });
|
|
141
|
-
* const compiled = East.compile(repeatString
|
|
141
|
+
* const compiled = East.compile(repeatString, []);
|
|
142
142
|
* compiled("abc", 3n); // "abcabcabc"
|
|
143
143
|
* compiled("x", 5n); // "xxxxx"
|
|
144
144
|
* compiled("test", 0n); // ""
|
|
@@ -166,7 +166,7 @@ export class StringExpr extends Expr {
|
|
|
166
166
|
* const getLength = East.function([StringType], IntegerType, ($, str) => {
|
|
167
167
|
* $.return(str.length());
|
|
168
168
|
* });
|
|
169
|
-
* const compiled = East.compile(getLength
|
|
169
|
+
* const compiled = East.compile(getLength, []);
|
|
170
170
|
* compiled("hello"); // 5n
|
|
171
171
|
* compiled(""); // 0n
|
|
172
172
|
* compiled("😀🎉"); // 2n (2 emoji code points)
|
|
@@ -196,7 +196,7 @@ export class StringExpr extends Expr {
|
|
|
196
196
|
* const substr = East.function([StringType, IntegerType, IntegerType], StringType, ($, str, start, end) => {
|
|
197
197
|
* $.return(str.substring(start, end));
|
|
198
198
|
* });
|
|
199
|
-
* const compiled = East.compile(substr
|
|
199
|
+
* const compiled = East.compile(substr, []);
|
|
200
200
|
* compiled("hello world", 0n, 5n); // "hello"
|
|
201
201
|
* compiled("hello world", 6n, 11n); // "world"
|
|
202
202
|
* compiled("test", 1n, 3n); // "es"
|
|
@@ -224,7 +224,7 @@ export class StringExpr extends Expr {
|
|
|
224
224
|
* const toUpper = East.function([StringType], StringType, ($, str) => {
|
|
225
225
|
* $.return(str.upperCase());
|
|
226
226
|
* });
|
|
227
|
-
* const compiled = East.compile(toUpper
|
|
227
|
+
* const compiled = East.compile(toUpper, []);
|
|
228
228
|
* compiled("hello"); // "HELLO"
|
|
229
229
|
* compiled("Hello World"); // "HELLO WORLD"
|
|
230
230
|
* compiled("test123"); // "TEST123"
|
|
@@ -250,7 +250,7 @@ export class StringExpr extends Expr {
|
|
|
250
250
|
* const toLower = East.function([StringType], StringType, ($, str) => {
|
|
251
251
|
* $.return(str.lowerCase());
|
|
252
252
|
* });
|
|
253
|
-
* const compiled = East.compile(toLower
|
|
253
|
+
* const compiled = East.compile(toLower, []);
|
|
254
254
|
* compiled("HELLO"); // "hello"
|
|
255
255
|
* compiled("Hello World"); // "hello world"
|
|
256
256
|
* compiled("TEST123"); // "test123"
|
|
@@ -277,7 +277,7 @@ export class StringExpr extends Expr {
|
|
|
277
277
|
* const splitString = East.function([StringType, StringType], ArrayType(StringType), ($, str, delim) => {
|
|
278
278
|
* $.return(str.split(delim));
|
|
279
279
|
* });
|
|
280
|
-
* const compiled = East.compile(splitString
|
|
280
|
+
* const compiled = East.compile(splitString, []);
|
|
281
281
|
* compiled("a,b,c", ","); // ["a", "b", "c"]
|
|
282
282
|
* compiled("hello world", " "); // ["hello", "world"]
|
|
283
283
|
* compiled("one", ","); // ["one"]
|
|
@@ -305,7 +305,7 @@ export class StringExpr extends Expr {
|
|
|
305
305
|
* const trimString = East.function([StringType], StringType, ($, str) => {
|
|
306
306
|
* $.return(str.trim());
|
|
307
307
|
* });
|
|
308
|
-
* const compiled = East.compile(trimString
|
|
308
|
+
* const compiled = East.compile(trimString, []);
|
|
309
309
|
* compiled(" hello "); // "hello"
|
|
310
310
|
* compiled("test\n"); // "test"
|
|
311
311
|
* compiled(" "); // ""
|
|
@@ -332,7 +332,7 @@ export class StringExpr extends Expr {
|
|
|
332
332
|
* const trimLeft = East.function([StringType], StringType, ($, str) => {
|
|
333
333
|
* $.return(str.trimStart());
|
|
334
334
|
* });
|
|
335
|
-
* const compiled = East.compile(trimLeft
|
|
335
|
+
* const compiled = East.compile(trimLeft, []);
|
|
336
336
|
* compiled(" hello"); // "hello"
|
|
337
337
|
* compiled("\ttest"); // "test"
|
|
338
338
|
* compiled(" hello "); // "hello "
|
|
@@ -358,7 +358,7 @@ export class StringExpr extends Expr {
|
|
|
358
358
|
* const trimRight = East.function([StringType], StringType, ($, str) => {
|
|
359
359
|
* $.return(str.trimEnd());
|
|
360
360
|
* });
|
|
361
|
-
* const compiled = East.compile(trimRight
|
|
361
|
+
* const compiled = East.compile(trimRight, []);
|
|
362
362
|
* compiled("hello "); // "hello"
|
|
363
363
|
* compiled("test\n"); // "test"
|
|
364
364
|
* compiled(" hello "); // " hello"
|
|
@@ -385,7 +385,7 @@ export class StringExpr extends Expr {
|
|
|
385
385
|
* const checkPrefix = East.function([StringType, StringType], BooleanType, ($, str, prefix) => {
|
|
386
386
|
* $.return(str.startsWith(prefix));
|
|
387
387
|
* });
|
|
388
|
-
* const compiled = East.compile(checkPrefix
|
|
388
|
+
* const compiled = East.compile(checkPrefix, []);
|
|
389
389
|
* compiled("hello world", "hello"); // true
|
|
390
390
|
* compiled("test", "te"); // true
|
|
391
391
|
* compiled("hello", "world"); // false
|
|
@@ -414,7 +414,7 @@ export class StringExpr extends Expr {
|
|
|
414
414
|
* const checkSuffix = East.function([StringType, StringType], BooleanType, ($, str, suffix) => {
|
|
415
415
|
* $.return(str.endsWith(suffix));
|
|
416
416
|
* });
|
|
417
|
-
* const compiled = East.compile(checkSuffix
|
|
417
|
+
* const compiled = East.compile(checkSuffix, []);
|
|
418
418
|
* compiled("hello world", "world"); // true
|
|
419
419
|
* compiled("test", "st"); // true
|
|
420
420
|
* compiled("hello", "world"); // false
|
|
@@ -443,7 +443,7 @@ export class StringExpr extends Expr {
|
|
|
443
443
|
* const hasSubstring = East.function([StringType, StringType], BooleanType, ($, str, substr) => {
|
|
444
444
|
* $.return(str.contains(substr));
|
|
445
445
|
* });
|
|
446
|
-
* const compiled = East.compile(hasSubstring
|
|
446
|
+
* const compiled = East.compile(hasSubstring, []);
|
|
447
447
|
* compiled("hello world", "world"); // true
|
|
448
448
|
* compiled("test", "xyz"); // false
|
|
449
449
|
*
|
|
@@ -451,7 +451,7 @@ export class StringExpr extends Expr {
|
|
|
451
451
|
* const hasDigits = East.function([StringType], BooleanType, ($, str) => {
|
|
452
452
|
* $.return(str.contains(/\d+/));
|
|
453
453
|
* });
|
|
454
|
-
* compiled = East.compile(hasDigits
|
|
454
|
+
* compiled = East.compile(hasDigits, []);
|
|
455
455
|
* compiled("test123"); // true
|
|
456
456
|
* compiled("test"); // false
|
|
457
457
|
* ```
|
|
@@ -506,7 +506,7 @@ export class StringExpr extends Expr {
|
|
|
506
506
|
* const findIndex = East.function([StringType, StringType], IntegerType, ($, str, substr) => {
|
|
507
507
|
* $.return(str.indexOf(substr));
|
|
508
508
|
* });
|
|
509
|
-
* const compiled = East.compile(findIndex
|
|
509
|
+
* const compiled = East.compile(findIndex, []);
|
|
510
510
|
* compiled("hello world", "world"); // 6n
|
|
511
511
|
* compiled("test", "t"); // 0n
|
|
512
512
|
* compiled("hello", "xyz"); // -1n
|
|
@@ -515,7 +515,7 @@ export class StringExpr extends Expr {
|
|
|
515
515
|
* const findDigit = East.function([StringType], IntegerType, ($, str) => {
|
|
516
516
|
* $.return(str.indexOf(/\d/));
|
|
517
517
|
* });
|
|
518
|
-
* compiled = East.compile(findDigit
|
|
518
|
+
* compiled = East.compile(findDigit, []);
|
|
519
519
|
* compiled("abc123"); // 3n
|
|
520
520
|
* ```
|
|
521
521
|
*/
|
|
@@ -570,7 +570,7 @@ export class StringExpr extends Expr {
|
|
|
570
570
|
* const replaceAll = East.function([StringType, StringType, StringType], StringType, ($, str, search, replace) => {
|
|
571
571
|
* $.return(str.replace(search, replace));
|
|
572
572
|
* });
|
|
573
|
-
* const compiled = East.compile(replaceAll
|
|
573
|
+
* const compiled = East.compile(replaceAll, []);
|
|
574
574
|
* compiled("hello hello", "hello", "hi"); // "hi hi"
|
|
575
575
|
* compiled("test_test_value", "test", "prod"); // "prod_prod_value"
|
|
576
576
|
*
|
|
@@ -578,7 +578,7 @@ export class StringExpr extends Expr {
|
|
|
578
578
|
* const swapWords = East.function([StringType], StringType, ($, str) => {
|
|
579
579
|
* $.return(str.replace(/(\w+) (\w+)/, "$2 $1"));
|
|
580
580
|
* });
|
|
581
|
-
* compiled = East.compile(swapWords
|
|
581
|
+
* compiled = East.compile(swapWords, []);
|
|
582
582
|
* compiled("hello world"); // "world hello"
|
|
583
583
|
* ```
|
|
584
584
|
*/
|
|
@@ -638,7 +638,7 @@ export class StringExpr extends Expr {
|
|
|
638
638
|
* const encodeUtf8 = East.function([StringType], BlobType, ($, str) => {
|
|
639
639
|
* $.return(str.encodeUtf8());
|
|
640
640
|
* });
|
|
641
|
-
* const compiled = East.compile(encodeUtf8
|
|
641
|
+
* const compiled = East.compile(encodeUtf8, []);
|
|
642
642
|
* compiled("hello"); // Blob with UTF-8 bytes
|
|
643
643
|
* compiled("😀"); // Blob with UTF-8 encoded emoji
|
|
644
644
|
* ```
|
|
@@ -665,7 +665,7 @@ export class StringExpr extends Expr {
|
|
|
665
665
|
* const encodeUtf16 = East.function([StringType], BlobType, ($, str) => {
|
|
666
666
|
* $.return(str.encodeUtf16());
|
|
667
667
|
* });
|
|
668
|
-
* const compiled = East.compile(encodeUtf16
|
|
668
|
+
* const compiled = East.compile(encodeUtf16, []);
|
|
669
669
|
* compiled("hello"); // Blob with UTF-16 LE bytes + BOM
|
|
670
670
|
* compiled("😀"); // Blob with UTF-16 encoded emoji
|
|
671
671
|
* ```
|
|
@@ -691,7 +691,7 @@ export class StringExpr extends Expr {
|
|
|
691
691
|
* const isEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
692
692
|
* $.return(a.equals(b));
|
|
693
693
|
* });
|
|
694
|
-
* const compiled = East.compile(isEqual
|
|
694
|
+
* const compiled = East.compile(isEqual, []);
|
|
695
695
|
* compiled("hello", "hello"); // true
|
|
696
696
|
* compiled("hello", "world"); // false
|
|
697
697
|
* ```
|
|
@@ -710,7 +710,7 @@ export class StringExpr extends Expr {
|
|
|
710
710
|
* const isNotEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
711
711
|
* $.return(a.notEquals(b));
|
|
712
712
|
* });
|
|
713
|
-
* const compiled = East.compile(isNotEqual
|
|
713
|
+
* const compiled = East.compile(isNotEqual, []);
|
|
714
714
|
* compiled("hello", "world"); // true
|
|
715
715
|
* compiled("hello", "hello"); // false
|
|
716
716
|
* ```
|
|
@@ -729,7 +729,7 @@ export class StringExpr extends Expr {
|
|
|
729
729
|
* const isGreater = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
730
730
|
* $.return(a.greaterThan(b));
|
|
731
731
|
* });
|
|
732
|
-
* const compiled = East.compile(isGreater
|
|
732
|
+
* const compiled = East.compile(isGreater, []);
|
|
733
733
|
* compiled("b", "a"); // true
|
|
734
734
|
* compiled("a", "b"); // false
|
|
735
735
|
* compiled("a", "a"); // false
|
|
@@ -749,7 +749,7 @@ export class StringExpr extends Expr {
|
|
|
749
749
|
* const isLess = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
750
750
|
* $.return(a.lessThan(b));
|
|
751
751
|
* });
|
|
752
|
-
* const compiled = East.compile(isLess
|
|
752
|
+
* const compiled = East.compile(isLess, []);
|
|
753
753
|
* compiled("a", "b"); // true
|
|
754
754
|
* compiled("b", "a"); // false
|
|
755
755
|
* compiled("a", "a"); // false
|
|
@@ -769,7 +769,7 @@ export class StringExpr extends Expr {
|
|
|
769
769
|
* const isGreaterOrEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
770
770
|
* $.return(a.greaterThanOrEqual(b));
|
|
771
771
|
* });
|
|
772
|
-
* const compiled = East.compile(isGreaterOrEqual
|
|
772
|
+
* const compiled = East.compile(isGreaterOrEqual, []);
|
|
773
773
|
* compiled("b", "a"); // true
|
|
774
774
|
* compiled("a", "a"); // true
|
|
775
775
|
* compiled("a", "b"); // false
|
|
@@ -789,7 +789,7 @@ export class StringExpr extends Expr {
|
|
|
789
789
|
* const isLessOrEqual = East.function([StringType, StringType], BooleanType, ($, a, b) => {
|
|
790
790
|
* $.return(a.lessThanOrEqual(b));
|
|
791
791
|
* });
|
|
792
|
-
* const compiled = East.compile(isLessOrEqual
|
|
792
|
+
* const compiled = East.compile(isLessOrEqual, []);
|
|
793
793
|
* compiled("a", "b"); // true
|
|
794
794
|
* compiled("a", "a"); // true
|
|
795
795
|
* compiled("b", "a"); // false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["../../../src/expr/struct.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAEL,SAAS,EACT,IAAI,EACJ,aAAa,EAEb,UAAU,EACV,KAAK,MAAM,EACZ,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA4D3C,eAAO,MAAM,UAAU;SApBc,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAC5C,MAAM,OAAO,GAAG,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["../../../src/expr/struct.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAEL,SAAS,EACT,IAAI,EACJ,aAAa,EAEb,UAAU,EACV,KAAK,MAAM,EACZ,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA4D3C,eAAO,MAAM,UAAU;SApBc,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,eAC5C,MAAM,OAAO,GAAG,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;sHAqB81D,GAAI;uHAAoS,GAAI;2HAAsd,GAAI;4HAA8S,GAAI;;;;;;;;;;;;;CAF76F,CAAC;AACtC,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG;KAAG,GAAG,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;CAAE,CAAC"}
|
package/dist/src/expr/struct.js
CHANGED
|
@@ -29,7 +29,7 @@ TypeSymbol } from "./expr.js";
|
|
|
29
29
|
* // Access fields with dot notation
|
|
30
30
|
* $.return(Expr.str`Hello, ${person.name}! You are ${person.age} years old.`);
|
|
31
31
|
* });
|
|
32
|
-
* const compiled = East.compile(greet
|
|
32
|
+
* const compiled = East.compile(greet, []);
|
|
33
33
|
* compiled({ name: "Alice", age: 30n }); // "Hello, Alice! You are 30 years old."
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
@@ -39,7 +39,7 @@ TypeSymbol } from "./expr.js";
|
|
|
39
39
|
* const birthday = East.function([PersonType], PersonType, ($, person) => {
|
|
40
40
|
* $.return({ ...person, age: person.age.add(1n) });
|
|
41
41
|
* });
|
|
42
|
-
* const compiled = East.compile(birthday
|
|
42
|
+
* const compiled = East.compile(birthday, []);
|
|
43
43
|
* compiled({ name: "Bob", age: 25n }); // { name: "Bob", age: 26n }
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
@@ -33,7 +33,7 @@ import type { BooleanExpr } from "./boolean.js";
|
|
|
33
33
|
* none: ($, _) => defaultVal
|
|
34
34
|
* }));
|
|
35
35
|
* });
|
|
36
|
-
* const compiled = East.compile(getOrDefault
|
|
36
|
+
* const compiled = East.compile(getOrDefault, []);
|
|
37
37
|
* compiled(Expr.variant("some", 42n), 0n); // 42n
|
|
38
38
|
* compiled(Expr.variant("none", null), 0n); // 0n
|
|
39
39
|
* ```
|
|
@@ -44,7 +44,7 @@ import type { BooleanExpr } from "./boolean.js";
|
|
|
44
44
|
* const checkSome = East.function([OptionType], BooleanType, ($, opt) => {
|
|
45
45
|
* $.return(opt.hasTag("some"));
|
|
46
46
|
* });
|
|
47
|
-
* const compiled = East.compile(checkSome
|
|
47
|
+
* const compiled = East.compile(checkSome, []);
|
|
48
48
|
* compiled(Expr.variant("some", 42n)); // true
|
|
49
49
|
* compiled(Expr.variant("none", null)); // false
|
|
50
50
|
* ```
|
|
@@ -64,7 +64,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
64
64
|
* const getTag = East.function([ResultType], StringType, ($, result) => {
|
|
65
65
|
* $.return(result.getTag());
|
|
66
66
|
* });
|
|
67
|
-
* const compiled = East.compile(getTag
|
|
67
|
+
* const compiled = East.compile(getTag, []);
|
|
68
68
|
* compiled(Expr.variant("ok", 42n)); // "ok"
|
|
69
69
|
* compiled(Expr.variant("error", "fail")); // "error"
|
|
70
70
|
* ```
|
|
@@ -86,7 +86,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
86
86
|
* const isSome = East.function([OptionType], BooleanType, ($, opt) => {
|
|
87
87
|
* $.return(opt.hasTag("some"));
|
|
88
88
|
* });
|
|
89
|
-
* const compiled = East.compile(isSome
|
|
89
|
+
* const compiled = East.compile(isSome, []);
|
|
90
90
|
* compiled(Expr.variant("some", 42n)); // true
|
|
91
91
|
* compiled(Expr.variant("none", null)); // false
|
|
92
92
|
* ```
|
|
@@ -115,7 +115,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
115
115
|
* const getOrDefault = East.function([OptionType], IntegerType, ($, opt) => {
|
|
116
116
|
* $.return(opt.unwrap("some", () => -1n)); // Return -1n if none
|
|
117
117
|
* });
|
|
118
|
-
* const compiled = East.compile(getOrDefault
|
|
118
|
+
* const compiled = East.compile(getOrDefault, []);
|
|
119
119
|
* compiled(Expr.variant("some", 42n)); // 42n
|
|
120
120
|
* compiled(Expr.variant("none", null)); // -1n
|
|
121
121
|
* ```
|
|
@@ -126,7 +126,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
126
126
|
* const unsafeUnwrap = East.function([OptionType], IntegerType, ($, opt) => {
|
|
127
127
|
* $.return(opt.unwrap("some")); // Throws error if none
|
|
128
128
|
* });
|
|
129
|
-
* const compiled = East.compile(unsafeUnwrap
|
|
129
|
+
* const compiled = East.compile(unsafeUnwrap, []);
|
|
130
130
|
* compiled(Expr.variant("some", 42n)); // 42n
|
|
131
131
|
* // compiled(Expr.variant("none", null)) would throw error
|
|
132
132
|
* ```
|
|
@@ -161,7 +161,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
161
161
|
* none: ($) => 0n
|
|
162
162
|
* }));
|
|
163
163
|
* });
|
|
164
|
-
* const compiled = East.compile(getValue
|
|
164
|
+
* const compiled = East.compile(getValue, []);
|
|
165
165
|
* compiled(Expr.variant("some", 42n)); // 42n
|
|
166
166
|
* compiled(Expr.variant("none", null)); // 0n
|
|
167
167
|
* ```
|
|
@@ -176,7 +176,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
176
176
|
* some: ($, val) => val
|
|
177
177
|
* }, ($) => 0n));
|
|
178
178
|
* });
|
|
179
|
-
* const compiled = East.compile(getOrZero
|
|
179
|
+
* const compiled = East.compile(getOrZero, []);
|
|
180
180
|
* compiled(Expr.variant("some", 42n)); // 42n
|
|
181
181
|
* compiled(Expr.variant("none", null)); // 0n
|
|
182
182
|
* ```
|
|
@@ -192,7 +192,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
192
192
|
* error: ($, _msg) => -1n
|
|
193
193
|
* }, ($) => 0n)); // pending -> 0
|
|
194
194
|
* });
|
|
195
|
-
* const compiled = East.compile(handleResult
|
|
195
|
+
* const compiled = East.compile(handleResult, []);
|
|
196
196
|
* compiled(Expr.variant("ok", 100n)); // 100n
|
|
197
197
|
* compiled(Expr.variant("error", "fail")); // -1n
|
|
198
198
|
* compiled(Expr.variant("pending", null)); // 0n
|
|
@@ -230,7 +230,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
230
230
|
* const doubleOrZero = East.function([OptionType], IntegerType, ($, opt) => {
|
|
231
231
|
* $.return(opt.matchTag("some", ($, val) => val.multiply(2n), ($) => 0n));
|
|
232
232
|
* });
|
|
233
|
-
* const compiled = East.compile(doubleOrZero
|
|
233
|
+
* const compiled = East.compile(doubleOrZero, []);
|
|
234
234
|
* compiled(Expr.variant("some", 42n)); // 84n
|
|
235
235
|
* compiled(Expr.variant("none", null)); // 0n
|
|
236
236
|
* ```
|
|
@@ -249,7 +249,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
249
249
|
* const isEqual = East.function([OptionType, OptionType], BooleanType, ($, a, b) => {
|
|
250
250
|
* $.return(a.equals(b));
|
|
251
251
|
* });
|
|
252
|
-
* const compiled = East.compile(isEqual
|
|
252
|
+
* const compiled = East.compile(isEqual, []);
|
|
253
253
|
* compiled(variant("some", 42n), variant("some", 42n)); // true
|
|
254
254
|
* compiled(variant("some", 42n), variant("some", 0n)); // false
|
|
255
255
|
* compiled(variant("some", 42n), variant("none", null)); // false
|
|
@@ -269,7 +269,7 @@ export declare class VariantExpr<Cases extends Record<string, any>> extends Expr
|
|
|
269
269
|
* const isNotEqual = East.function([OptionType, OptionType], BooleanType, ($, a, b) => {
|
|
270
270
|
* $.return(a.notEquals(b));
|
|
271
271
|
* });
|
|
272
|
-
* const compiled = East.compile(isNotEqual
|
|
272
|
+
* const compiled = East.compile(isNotEqual, []);
|
|
273
273
|
* compiled(variant("some", 42n), variant("some", 0n)); // true
|
|
274
274
|
* compiled(variant("some", 42n), variant("some", 42n)); // false
|
|
275
275
|
* ```
|