├── .envrc ├── .eslintrc.js ├── .github └── workflows │ ├── main.yaml │ └── main_pr.yaml ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── flake.lock ├── flake.nix ├── package.json ├── rollup.config.mjs ├── src ├── composite │ ├── array.spec.ts │ ├── array.ts │ ├── index.ts │ ├── map.spec.ts │ ├── map.ts │ ├── object.spec.ts │ ├── object.ts │ ├── record.spec.ts │ ├── record.ts │ ├── set.spec.ts │ ├── set.ts │ ├── tuple.spec.ts │ └── tuple.ts ├── index.ts ├── logic │ ├── and.spec.ts │ ├── and.ts │ ├── discriminated-union.spec.ts │ ├── discriminated-union.ts │ ├── index.ts │ ├── not.spec.ts │ ├── not.ts │ ├── or.spec.ts │ ├── or.ts │ ├── xor.spec.ts │ └── xor.ts ├── refine.spec.ts ├── refine.ts ├── schema.spec.ts ├── schema.ts ├── simple │ ├── bigint.spec.ts │ ├── bigint.ts │ ├── boolean.spec.ts │ ├── boolean.ts │ ├── date.spec.ts │ ├── date.ts │ ├── enum.spec.ts │ ├── enum.ts │ ├── index.ts │ ├── literal.spec.ts │ ├── literal.ts │ ├── null-schema.spec.ts │ ├── null-schema.ts │ ├── number.spec.ts │ ├── number.ts │ ├── string.spec.ts │ └── string.ts ├── utility │ ├── deep-partial.spec.ts │ ├── deep-partial.ts │ ├── index.ts │ ├── intersect.ts │ ├── lazy.spec.ts │ ├── lazy.ts │ ├── optics.spec.ts │ ├── optics.ts │ ├── optional.spec.ts │ ├── optional.ts │ ├── partial.spec.ts │ ├── partial.ts │ ├── path-validation.spec.ts │ ├── path-validation.ts │ ├── procedure.spec.ts │ ├── procedure.ts │ ├── promise.spec.ts │ ├── promise.ts │ ├── readonly.spec.ts │ ├── readonly.ts │ ├── to-json-schema.spec.ts │ ├── to-json-schema.ts │ └── unionize.ts ├── validation.spec.ts └── validation.ts └── tsconfig.json /.envrc: -------------------------------------------------------------------------------- 1 | use "flake" 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/.github/workflows/main.yaml -------------------------------------------------------------------------------- /.github/workflows/main_pr.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/.github/workflows/main_pr.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .direnv 2 | .envrc 3 | coverage 4 | build 5 | dist 6 | node_modules 7 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/.npmignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/README.md -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/flake.lock -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/flake.nix -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/package.json -------------------------------------------------------------------------------- /rollup.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/rollup.config.mjs -------------------------------------------------------------------------------- /src/composite/array.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/array.spec.ts -------------------------------------------------------------------------------- /src/composite/array.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/array.ts -------------------------------------------------------------------------------- /src/composite/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/index.ts -------------------------------------------------------------------------------- /src/composite/map.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/map.spec.ts -------------------------------------------------------------------------------- /src/composite/map.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/map.ts -------------------------------------------------------------------------------- /src/composite/object.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/object.spec.ts -------------------------------------------------------------------------------- /src/composite/object.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/object.ts -------------------------------------------------------------------------------- /src/composite/record.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/record.spec.ts -------------------------------------------------------------------------------- /src/composite/record.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/record.ts -------------------------------------------------------------------------------- /src/composite/set.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/set.spec.ts -------------------------------------------------------------------------------- /src/composite/set.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/set.ts -------------------------------------------------------------------------------- /src/composite/tuple.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/tuple.spec.ts -------------------------------------------------------------------------------- /src/composite/tuple.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/composite/tuple.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/logic/and.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/and.spec.ts -------------------------------------------------------------------------------- /src/logic/and.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/and.ts -------------------------------------------------------------------------------- /src/logic/discriminated-union.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/discriminated-union.spec.ts -------------------------------------------------------------------------------- /src/logic/discriminated-union.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/discriminated-union.ts -------------------------------------------------------------------------------- /src/logic/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/index.ts -------------------------------------------------------------------------------- /src/logic/not.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/not.spec.ts -------------------------------------------------------------------------------- /src/logic/not.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/not.ts -------------------------------------------------------------------------------- /src/logic/or.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/or.spec.ts -------------------------------------------------------------------------------- /src/logic/or.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/or.ts -------------------------------------------------------------------------------- /src/logic/xor.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/xor.spec.ts -------------------------------------------------------------------------------- /src/logic/xor.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/logic/xor.ts -------------------------------------------------------------------------------- /src/refine.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/refine.spec.ts -------------------------------------------------------------------------------- /src/refine.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/refine.ts -------------------------------------------------------------------------------- /src/schema.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/schema.spec.ts -------------------------------------------------------------------------------- /src/schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/schema.ts -------------------------------------------------------------------------------- /src/simple/bigint.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/bigint.spec.ts -------------------------------------------------------------------------------- /src/simple/bigint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/bigint.ts -------------------------------------------------------------------------------- /src/simple/boolean.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/boolean.spec.ts -------------------------------------------------------------------------------- /src/simple/boolean.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/boolean.ts -------------------------------------------------------------------------------- /src/simple/date.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/date.spec.ts -------------------------------------------------------------------------------- /src/simple/date.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/date.ts -------------------------------------------------------------------------------- /src/simple/enum.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/enum.spec.ts -------------------------------------------------------------------------------- /src/simple/enum.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/enum.ts -------------------------------------------------------------------------------- /src/simple/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/index.ts -------------------------------------------------------------------------------- /src/simple/literal.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/literal.spec.ts -------------------------------------------------------------------------------- /src/simple/literal.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/literal.ts -------------------------------------------------------------------------------- /src/simple/null-schema.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/null-schema.spec.ts -------------------------------------------------------------------------------- /src/simple/null-schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/null-schema.ts -------------------------------------------------------------------------------- /src/simple/number.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/number.spec.ts -------------------------------------------------------------------------------- /src/simple/number.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/number.ts -------------------------------------------------------------------------------- /src/simple/string.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/string.spec.ts -------------------------------------------------------------------------------- /src/simple/string.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/simple/string.ts -------------------------------------------------------------------------------- /src/utility/deep-partial.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/deep-partial.spec.ts -------------------------------------------------------------------------------- /src/utility/deep-partial.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/deep-partial.ts -------------------------------------------------------------------------------- /src/utility/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/index.ts -------------------------------------------------------------------------------- /src/utility/intersect.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/intersect.ts -------------------------------------------------------------------------------- /src/utility/lazy.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/lazy.spec.ts -------------------------------------------------------------------------------- /src/utility/lazy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/lazy.ts -------------------------------------------------------------------------------- /src/utility/optics.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/optics.spec.ts -------------------------------------------------------------------------------- /src/utility/optics.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/optics.ts -------------------------------------------------------------------------------- /src/utility/optional.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/optional.spec.ts -------------------------------------------------------------------------------- /src/utility/optional.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/optional.ts -------------------------------------------------------------------------------- /src/utility/partial.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/partial.spec.ts -------------------------------------------------------------------------------- /src/utility/partial.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/partial.ts -------------------------------------------------------------------------------- /src/utility/path-validation.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/path-validation.spec.ts -------------------------------------------------------------------------------- /src/utility/path-validation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/path-validation.ts -------------------------------------------------------------------------------- /src/utility/procedure.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/procedure.spec.ts -------------------------------------------------------------------------------- /src/utility/procedure.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/procedure.ts -------------------------------------------------------------------------------- /src/utility/promise.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/promise.spec.ts -------------------------------------------------------------------------------- /src/utility/promise.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/promise.ts -------------------------------------------------------------------------------- /src/utility/readonly.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/readonly.spec.ts -------------------------------------------------------------------------------- /src/utility/readonly.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/readonly.ts -------------------------------------------------------------------------------- /src/utility/to-json-schema.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/to-json-schema.spec.ts -------------------------------------------------------------------------------- /src/utility/to-json-schema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/to-json-schema.ts -------------------------------------------------------------------------------- /src/utility/unionize.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/utility/unionize.ts -------------------------------------------------------------------------------- /src/validation.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/validation.spec.ts -------------------------------------------------------------------------------- /src/validation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/src/validation.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spaceteams/zap/HEAD/tsconfig.json --------------------------------------------------------------------------------