{"_id":"@antivixen/andor","_rev":"9-f19defee5aea2491fe8f18a8ddf92fe2","name":"@antivixen/andor","dist-tags":{"latest":"0.1.7"},"versions":{"0.0.2":{"name":"@antivixen/andor","version":"0.0.2","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.0.2","_integrity":"sha512-YBQWUIX0Y7azDKo1YoIxIxkciQUN30eK3XQEAjwEcJnnA4JkjyEsPOTEB85gnmeVyteNJ9h0x70zZbv7tmGzrQ==","_resolved":"/tmp/83835174bebf79098448beca6191d608/antivixen-andor-0.0.2.tgz","_from":"file:antivixen-andor-0.0.2.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-YBQWUIX0Y7azDKo1YoIxIxkciQUN30eK3XQEAjwEcJnnA4JkjyEsPOTEB85gnmeVyteNJ9h0x70zZbv7tmGzrQ==","shasum":"9b3541e891dda9d63e828f0058150cb48f458a53","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.0.2.tgz","fileCount":13,"unpackedSize":18163,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfojAykztEhf3F0Vbw40Qk52WK8dPhvYSu2Bmudcae6gIgXqir4LEZdju21lmklPfD77VUJpBHvVxa6q3t13ylaMs="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.0.2_1686507697916_0.4143808667360047"},"_hasShrinkwrap":false},"0.0.3":{"name":"@antivixen/andor","version":"0.0.3","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.0.3","_integrity":"sha512-A9uFCkroD8AoVsyOhYWIzEgnO3N0aYk3+74J68aJFJMQIUOnq9xRcli00hknquNn6F0g2Z3/opfB3xtJOhj/4w==","_resolved":"/tmp/2d816e255804a770a5a6da9a4565e877/antivixen-andor-0.0.3.tgz","_from":"file:antivixen-andor-0.0.3.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-A9uFCkroD8AoVsyOhYWIzEgnO3N0aYk3+74J68aJFJMQIUOnq9xRcli00hknquNn6F0g2Z3/opfB3xtJOhj/4w==","shasum":"22cca45845606c4736d53f61f1fc2bb10434c4c3","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.0.3.tgz","fileCount":13,"unpackedSize":18229,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYcnbbljIbz/MiUYwxFVB3RxRC1hjF8Xe/4AQ3KHLwmgIgESr3hlSI22riVgP5+byqtuZSnlmolsVY8nHkB34iEug="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.0.3_1686507899632_0.825446269210403"},"_hasShrinkwrap":false},"0.1.0":{"name":"@antivixen/andor","version":"0.1.0","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.0","_integrity":"sha512-lMcxtYjfSYwf/A/hqWoQ18bJICgEMHQEQ7WMqaOuu+/l1yBOaFggLJBZMUuKvcwG01WfhjFB9aBtQQyBIRgPJg==","_resolved":"/tmp/a4dde706e2adf41a6e227a2e5eba2ab9/antivixen-andor-0.1.0.tgz","_from":"file:antivixen-andor-0.1.0.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-lMcxtYjfSYwf/A/hqWoQ18bJICgEMHQEQ7WMqaOuu+/l1yBOaFggLJBZMUuKvcwG01WfhjFB9aBtQQyBIRgPJg==","shasum":"5c758da4da9505a3b88b036ee259bde977639453","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.0.tgz","fileCount":16,"unpackedSize":19396,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF8XzAYsGhG3ndspehABZDJVeDixwuUsxIoflf4QAVATAiEAzCSQTDRbYEG2tJ9gJURNsqVSlYjguSwF6IpMm+/ZoMA="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.0_1687027121058_0.4585361295361503"},"_hasShrinkwrap":false},"0.1.1":{"name":"@antivixen/andor","version":"0.1.1","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.1","_integrity":"sha512-pRVJVrV8Dnocc0l8BdERPUUtZ8evPEl2s+f6pj2bYx2++U6LfNFjwtPJ/7ztUORUGh8MB6+Kkz6cmWsS5huEVA==","_resolved":"/tmp/41ce8bfe8d30dbabeced131a09c3efa6/antivixen-andor-0.1.1.tgz","_from":"file:antivixen-andor-0.1.1.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-pRVJVrV8Dnocc0l8BdERPUUtZ8evPEl2s+f6pj2bYx2++U6LfNFjwtPJ/7ztUORUGh8MB6+Kkz6cmWsS5huEVA==","shasum":"7b7ccd88802efec508467e3b2c0fdb019727d9be","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.1.tgz","fileCount":16,"unpackedSize":20188,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHXxJpLs0Y7fzHOKFrYMDtsaN6xPTjb7yWlkAwhaAQrQIhAIcbfzkwHyD09jDqLJzYA5gUwxb66XH8HQTSrLuwZSa3"}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.1_1687031548849_0.26650396107080465"},"_hasShrinkwrap":false},"0.1.2":{"name":"@antivixen/andor","version":"0.1.2","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.2","_integrity":"sha512-OOd/RT9n22cvjb7VkDtDylmF7TJ06f9BMcQNCtN8aLUHvYVvnMpXaf5385NTrpgw0C41UTOv0uHmUePLd68K5g==","_resolved":"/tmp/33f74479ad6629403ca17d234f551d0e/antivixen-andor-0.1.2.tgz","_from":"file:antivixen-andor-0.1.2.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OOd/RT9n22cvjb7VkDtDylmF7TJ06f9BMcQNCtN8aLUHvYVvnMpXaf5385NTrpgw0C41UTOv0uHmUePLd68K5g==","shasum":"3d5c3c6df373c806f535f5d58dc206f611c0d1a1","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.2.tgz","fileCount":16,"unpackedSize":20257,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDLWmfkm8lfyrhXSDmxGGRcFlph6K4dVCGm/VuRtPixAiBoJEe+Jg/kVrJLU2v0iTtlJ/zo8OhhAUbaZt6IXS+qiw=="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.2_1687032252959_0.4650839113435692"},"_hasShrinkwrap":false},"0.1.3":{"name":"@antivixen/andor","version":"0.1.3","description":"","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.3","_integrity":"sha512-93VgjUUEDdoPTm6js2GMHtE4wcA2TTEKrp/bMIzF0kvy3fXsUBvJ7l/EvPPIiXhuea2tl7aPLRg61rigOKszSw==","_resolved":"/tmp/04d6e74b06ca9bdc3471ec4792cfba76/antivixen-andor-0.1.3.tgz","_from":"file:antivixen-andor-0.1.3.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-93VgjUUEDdoPTm6js2GMHtE4wcA2TTEKrp/bMIzF0kvy3fXsUBvJ7l/EvPPIiXhuea2tl7aPLRg61rigOKszSw==","shasum":"aaccee2827f6f6fc766268c9d141c28a554d9037","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.3.tgz","fileCount":16,"unpackedSize":20316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfhC7Gvq9y9iYITG93Qa/YOR3NVuPoWQf7dlzpzF2L4wIhANwnasS6YvvglX0eqdeXJiTwLrsPczie1dTbPX5z5tkJ"}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.3_1687527053004_0.5186589395532921"},"_hasShrinkwrap":false},"0.1.4":{"name":"@antivixen/andor","version":"0.1.4","description":"Small (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.4","_integrity":"sha512-CP5KbaMpnUODHYo0ClEp4HA4Jej+wPmVD+TWBOWdHxZeh65XCKzg9qNfUU3KGwrIhmJKuCxNGUqynLkHP/QscQ==","_resolved":"/tmp/d5f61663f1ec65e7ad42efb5387ce540/antivixen-andor-0.1.4.tgz","_from":"file:antivixen-andor-0.1.4.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-CP5KbaMpnUODHYo0ClEp4HA4Jej+wPmVD+TWBOWdHxZeh65XCKzg9qNfUU3KGwrIhmJKuCxNGUqynLkHP/QscQ==","shasum":"024ab92ee672fd3a66f9525e3051d6a1360c7664","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.4.tgz","fileCount":17,"unpackedSize":23896,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4fi1olvDtRl29MkLZ8ybXFbf0iKKwjdDFRknvsQNDHwIgDSErNO9DzgeFl3pnG2nDjHmSsm8kcrrTP1gl0KRLQE4="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.4_1687704563570_0.770691824737048"},"_hasShrinkwrap":false},"0.1.5":{"name":"@antivixen/andor","version":"0.1.5","description":"Small (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"_id":"@antivixen/andor@0.1.5","_integrity":"sha512-lQs0jQEf59n112AY3Zb+kQ/m6Oi2R+5QnA0BYEFq891uLw9PoRO9zK7mVjk5Zo9NiUWfgCgnp6aZLjT+ge370g==","_resolved":"/tmp/659bf15d29b446a12656e341936d890d/antivixen-andor-0.1.5.tgz","_from":"file:antivixen-andor-0.1.5.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-lQs0jQEf59n112AY3Zb+kQ/m6Oi2R+5QnA0BYEFq891uLw9PoRO9zK7mVjk5Zo9NiUWfgCgnp6aZLjT+ge370g==","shasum":"183f0d3e7e4808b86974a0ef6fbc4c1d2066b20d","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.5.tgz","fileCount":17,"unpackedSize":23965,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSwCiy8uNTFFTMfePRio+TEuhZpGQcQ7cWp6VW4bXouAiBOjcnWz6neTNlV8KYzZ+nwggKaJBJui1PuhCqG35lZ5g=="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.5_1687707379998_0.35891446275244365"},"_hasShrinkwrap":false},"0.1.6":{"name":"@antivixen/andor","version":"0.1.6","description":"Small (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"repository":{"type":"git","url":"git+https://github.com/antivixen/andor.git"},"keywords":[],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"bugs":{"url":"https://github.com/antivixen/andor/issues"},"homepage":"https://github.com/antivixen/andor#readme","_id":"@antivixen/andor@0.1.6","_integrity":"sha512-kgBa/d98YU4s+50vIyIa+MI/3PSR6wUXlFvm4hh+CfXUL+N4+Vh4l0PsXnk2cl4YAQAn4/fH4L8p8e3cQF3FDQ==","_resolved":"/tmp/fb2a5e7ed720d09893e9fe70d06bde6d/antivixen-andor-0.1.6.tgz","_from":"file:antivixen-andor-0.1.6.tgz","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-kgBa/d98YU4s+50vIyIa+MI/3PSR6wUXlFvm4hh+CfXUL+N4+Vh4l0PsXnk2cl4YAQAn4/fH4L8p8e3cQF3FDQ==","shasum":"09dd116bf9e74c06b9c6f0f678f9be320ae76b45","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.6.tgz","fileCount":17,"unpackedSize":24153,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoFSCaTqAToXT8zZ3R2gCaTNEDFjXt1UxMWBpcq1HNXQIgVItHtxhCR+hm3yuiXs0Vz3wt+KQ5Qt00+g6C3Sv9oZQ="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.6_1687707911241_0.8799609069869636"},"_hasShrinkwrap":false},"0.1.7":{"name":"@antivixen/andor","version":"0.1.7","description":"Small (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","private":false,"repository":{"type":"git","url":"git+https://github.com/antivixen/andor.git"},"keywords":["type safe","conditional evaluation","switch-case","functional ts"],"author":{"name":"egregor2011"},"license":"MIT","devDependencies":{"@changesets/cli":"^2.26.1","tsup":"^6.7.0","typescript":"^5.1.3","vitest":"^0.32.0"},"scripts":{"dev":"vitest","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","lint":"tsc","ci":"pnpm run lint && pnpm run test && pnpm run build","release":"pnpm run lint && pnpm run test && pnpm run build && changeset publish"},"bugs":{"url":"https://github.com/antivixen/andor/issues"},"homepage":"https://github.com/antivixen/andor#readme","_id":"@antivixen/andor@0.1.7","_integrity":"sha512-iWenOvtAzP1DPnTR34mO2on7yHQn33SfQ85uvZaFfSqP6qQIuhddNqEVSrFW4ZL7xlpL2vrKTq+TKxIiT3GTKA==","_resolved":"/tmp/243f733ea8c26e260131c4e352059d49/antivixen-andor-0.1.7.tgz","_from":"file:antivixen-andor-0.1.7.tgz","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-iWenOvtAzP1DPnTR34mO2on7yHQn33SfQ85uvZaFfSqP6qQIuhddNqEVSrFW4ZL7xlpL2vrKTq+TKxIiT3GTKA==","shasum":"c328f2d284c3e9b88f45a0e485d539ffbdcbbf00","tarball":"https://registry.npmjs.org/@antivixen/andor/-/andor-0.1.7.tgz","fileCount":17,"unpackedSize":24404,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUnAKeB8ec4RNjhCdaIGD6MQ91ZFxWCOSkYG9gDCALMwIgahGyOQ/Cwk0kGXLVNpJ6n/c/NgkGHjqhqteJpJ3ZMzw="}]},"_npmUser":{"name":"antivixen","email":"egregor2011@gmail.com"},"directories":{},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/andor_0.1.7_1693217598308_0.05131318586249489"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-11T18:21:37.858Z","0.0.2":"2023-06-11T18:21:38.080Z","modified":"2023-08-28T10:13:18.704Z","0.0.3":"2023-06-11T18:24:59.837Z","0.1.0":"2023-06-17T18:38:41.208Z","0.1.1":"2023-06-17T19:52:29.062Z","0.1.2":"2023-06-17T20:04:13.130Z","0.1.3":"2023-06-23T13:30:53.192Z","0.1.4":"2023-06-25T14:49:23.835Z","0.1.5":"2023-06-25T15:36:20.211Z","0.1.6":"2023-06-25T15:45:11.409Z","0.1.7":"2023-08-28T10:13:18.495Z"},"maintainers":[{"name":"antivixen","email":"egregor2011@gmail.com"}],"keywords":["type safe","conditional evaluation","switch-case","functional ts"],"author":{"name":"egregor2011"},"license":"MIT","readme":"# andor\n\nSmall (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.\n\n## Contents\n\n- [Installation](#installation)\n- [Methods](#methods)\n- [Examples](#examples)\n\n## Installation\n\n- Using npm - `npm install @antivixen/andor`\n- Using yarn - `yarn add @antivixen/andor`\n- Using pnpm - `pnpm add @antivixen/andor`\n\n## Methods\n\n- `getEvaluation<T>`:\n\n```ts\nconst result = getEvaluation({\n  case: true,\n  and: () => \"True\",\n  or: () => \"False\",\n});\n\nconsole.log(result);\n// result === \"True\"\n```\n\nGeneric type is optional, however you might need to specify in case the return type is a union type,\notherwise you'll gent an error:\n\n```ts\nconst result = getEvaluation<string | null>({\n  case: false,\n  and: () => \"True\",\n  or: {\n    case: true,\n    and: () => \"False\",\n    or: () => null,\n  },\n});\n\nconsole.log(result);\n// result === \"False\"\n```\n\n`and` / `or` method in the scheme might be either a function or another scheme object:\n\n```ts\ntype Scheme = {\n  case: boolean // any other types passing through will be converted to boolean\n  and() {\n    // either function or Scheme\n  }\n  or(){\n    //either function or Scheme\n  }\n}\n```\n\n- `getCase<T, I>`:\n  Functional alternative to JS `Switch Statement`\n\n```ts\ntype Case = \"True\" | \"False\";\nconst value: Case = getValueFromSomewhere();\n\nconst result = getCase({\n  switch: value,\n  default: \"It's unknown\",\n  cases: { True: \"It's true\", False: \"It's false\" },\n});\n```\n\nGenerics are optional, if you'd like to be more specific go ahead with `getCase<Options, Result>':\n\n```ts\nconst result = getCase<\"True\" | \"False\", \"It's true\" | \"It's false\">({\n  switch: value,\n  default: \"It's unknown\",\n  cases: { True: \"It's true\", False: \"It's false\" },\n});\n```\n\nSee some advanced use cases in [Examples](#examples)\n\n## Examples\n\nHere are some particular cases for using the methods\n\n- `getEvaluation`:\n\n```ts\ntype Status = \"Guest\" | \"User\" | \"Editor\" | \"Admin\";\n\nlet isUserAuthorised;\nlet isAdmin;\nlet isEditor;\n```\n\nIf you need to get the user status, based on the provided variables you have the following options:\n\n```ts\nconst userStatus: Status = isUserAuthorised\n  ? isAdmin\n    ? \"Admin\"\n    : isEditor\n    ? \"Editor\"\n    : \"User\"\n  : \"Guest\";\n```\n\nNot a great idea given it's not just super hard to follow the flow, but also should be forbidden in eslint\n\n```ts\nlet userStatus: Status;\nif (isUserAuthorised) {\n  if (isAdmin) {\n    userStatus = \"Admin\";\n  } else if (isEditor) {\n    userStatus = \"Editor\";\n  } else {\n    userStatus = \"User\";\n  }\n} else {\n  userStatus = \"Guest\";\n}\n```\n\nThis case clearly needs a separate method, which is + 1 level of abstraction, additionally not a great choice flow / immutability wise\n\n```ts\nconst userStatus = ((): Status => {\n  if (isUserAuthorised) {\n    if (isAdmin) {\n      return \"Admin\";\n    }\n    if (isEditor) {\n      return \"Editor\";\n    }\n    return \"User\";\n  }\n  return \"Guest\";\n})();\n```\n\nYou might recall the good old `IIFE` and come up with a much better construction. However, it can be a bit inconvenient to read in certain edge cases\n\n```ts\nconst userStatus = getEvaluation<Status>({\n  case: isUserAuthorised,\n  or: () => \"Guest\",\n  and: {\n    case: isAdmin,\n    and: () => \"Admin\",\n    or: {\n      case: isEditor,\n      and: () => \"Editor\",\n      or: () => \"User\",\n    },\n  },\n});\n```\n\nThe `getEvaluation` method provides a clear scheme of all possible cases, and the returning functions can have side effects, such as acting as a middleware if necessary.\n\n- `getCase`:\n  Yet to be written..\n","readmeFilename":"README.md","description":"Small (<1kb) library for utilizing type safe and predictable methods to deal with conditional statements.","homepage":"https://github.com/antivixen/andor#readme","repository":{"type":"git","url":"git+https://github.com/antivixen/andor.git"},"bugs":{"url":"https://github.com/antivixen/andor/issues"}}