{"_id":"typescript-toolbox","_rev":"27-b8ff745167c5b3d030e800350d9b42ba","time":{"created":"2023-08-10T11:38:56.120Z","0.1.0":"2019-10-25T21:09:14.800Z","modified":"2023-09-10T12:31:14.422Z","0.1.1":"2019-10-26T11:34:52.764Z","0.1.2":"2019-10-26T11:37:07.830Z","0.3.0":"2019-11-12T20:59:56.131Z","0.4.0":"2019-11-13T19:31:18.395Z","0.4.2":"2019-11-13T20:58:46.608Z","0.4.3":"2019-11-14T18:01:24.625Z","1.0.0":"2019-11-14T19:22:57.764Z","1.0.1":"2019-11-15T17:29:51.188Z","1.0.2":"2019-11-15T17:37:16.275Z","1.2.0":"2019-12-03T20:20:27.028Z","1.2.1":"2019-12-04T14:44:57.375Z","1.3.0":"2019-12-07T11:54:08.735Z","1.3.1":"2020-03-29T12:02:36.381Z","0.0.1":"2023-08-10T11:38:56.462Z","0.0.2":"2023-08-11T06:20:40.300Z","0.0.3":"2023-08-11T07:18:22.200Z","0.0.4":"2023-08-13T06:18:30.278Z","0.0.5":"2023-08-14T06:33:39.813Z","0.0.6":"2023-08-18T06:28:15.687Z","0.0.7":"2023-08-18T12:54:19.849Z","0.0.8":"2023-09-03T09:45:05.310Z","0.0.9":"2023-09-07T08:00:51.441Z","0.0.10":"2023-09-10T12:31:14.248Z"},"name":"typescript-toolbox","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.1":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.1","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"42389521486785259b674728624e4f22e3317598","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.1","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-yqGRZ/jco0CH/p+D2YkrSJ+PJ8g1Xuk4vRUDsPSc2P98BoXHeVPJc1btbkfk1iWmTXqGyspvGOdGIqQrBBdm9g==","shasum":"d4171076cb80159b6bc64d6478978890a6034f54","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.1.tgz","fileCount":26,"unpackedSize":20453,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQ9iAITW3xZP2U0uzWyHhgUq9ke5nxO2ljrD+HK1GqiAIgUxTPaxp0pCoNx7GyFxGB2s8MVEn+ZJSSFak7PWGOwTA="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.1_1691667536215_0.013395178186246026"},"_hasShrinkwrap":false},"0.0.2":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.2","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"d71904222457c1d608442d064c506e1080e87fee","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.2","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-WeogtuseKqb7zIIft0/on1GkRjjckIpg2akAmJkwk28QOLIYmfl5hld/9qnFYZBvM7Cbf4wB8KYZVR2TmRkIXQ==","shasum":"5279657ca5d27cd9b90b60a1d18d3dded61f3ed4","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.2.tgz","fileCount":26,"unpackedSize":26261,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdG9k3JaXMq6hSdTPIBR64VXGiuWtOosDsC/h7qjHqRQIgeIt6JBx/VXMRkP7bZsqQgn4aNljUljRt62dBpegPkpo="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.2_1691734840095_0.4804762537545364"},"_hasShrinkwrap":false},"0.0.3":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.3","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"038b14406e7bbe3d3bc80146cb9277b7d002deb3","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.3","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-o/YM/4qJ60B+dHH9kONgZd5434P5nlAgBKEpoXkap7iWxVgvWdzXhkHqaObj1mMPC4QdY+vWn6hqD86RxlrQvg==","shasum":"d5b76c605e2552ec72c3b78159aaa42eb5275075","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.3.tgz","fileCount":26,"unpackedSize":26177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9Ai4lP7Mp2DI+NhzJeOhKUDug/XCBsjPcUHpjYctbRAiBMgNc79j24ZmiltVKXo6DMld6vbT5eDh2QODR5dby2Sw=="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.3_1691738301948_0.44750769565525395"},"_hasShrinkwrap":false},"0.0.4":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.4","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"310e25c45402da59f0846d130b6ed9902f59dced","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.4","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-iSy2xKgOi0C8D5eU7E+ApSCQYQysaktUx+cqJzRAQykbVfxPYEANY+tthavGEd8JyPZMh6wektwsOYa3UdUrCw==","shasum":"69c18445d355874773944abf4b5daaea3edf7eff","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.4.tgz","fileCount":26,"unpackedSize":26175,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOsLAeSE2CEPXk1RCpbqxUxy9B1Ox18Z8lyiRWW7B2BAiEAo+o3LKIYY/2/4X8XPLIl3+thvm3Q+oKUT7GFq0+oOzg="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.4_1691907510094_0.2345053990702537"},"_hasShrinkwrap":false},"0.0.5":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.5","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"26e0299427fc252f03c1e9d4b4312546e7464a67","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.5","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-sIc3EVJ/bPxf+as0KXKcxBvOMSNdAYFeZCxL25txvxKCWgeBTvEg9g9fj+OC1gfmdEvLXun8AnBVFhC5EYN/Fw==","shasum":"62d04ac6b005f6f9ca215573cbf0acde39082db5","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.5.tgz","fileCount":26,"unpackedSize":26177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrTfdkewcvAM5eLJ2nRwyzuPFL9hPKv86aICyth3svgAIgfByLCmve58XbXjXilcLYN1asccOLBKFc/7gGH8Q2nHw="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.5_1691994819562_0.8960674750260933"},"_hasShrinkwrap":false},"0.0.6":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.6","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","tooblox","utilities"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"58a4d65c2bbc9cd3692b454b19d0d72f09f6c84d","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.6","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-BrOaFrUn9t24KpYBWtNhmLFPfEhCUuzqGSe66c03QlZ0fyqkS3uYhHi8m73A9BWt9vTTqWc8oyQ1GrdXrcnfUA==","shasum":"7c209cefdb9cf827c1ce534a924e4d7982769287","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.6.tgz","fileCount":26,"unpackedSize":21202,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHi4FLCA8HkDipG0eKj/yzvOB8VkXuUfku+vfcAg/Fu9AiEA1+ign3C+UBhOJubxTG4bIqEEvIdoP3H/Lcwr1MXN8ks="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.6_1692340095507_0.6071228881147133"},"_hasShrinkwrap":false},"0.0.7":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.7","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","toolbox","utils"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"fd25039244d9f91476994c5a6641855b6070da09","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.7","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-tv6En6HZDH7A4z7wPh7g5B55q1yneYi2tVMox2X/mKHIkSvjDz8vPazFnftz8d9D8KD3LXzttgUY5Gnw+E0Z9A==","shasum":"bf1b6519720646a4b983d5ffefa3ccbfa694856e","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.7.tgz","fileCount":26,"unpackedSize":21198,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr/jrREhmyJWwtK+DLopfteEJpObEjXRSM0w8DAOuGUwIgT9Yze2hcitzOgP2GM+otEy96hzoV5li3bGURZzS/WhU="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.7_1692363259661_0.23806320440365947"},"_hasShrinkwrap":false},"0.0.8":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.8","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","toolbox","utils"],"devDependencies":{"typescript":"^5.1.6","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest"},"gitHead":"0ce5a22d00309a1603f234a5f33bc15f8891d678","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.8","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-BJPUt5qxNB/vSwuJKSy6+7YfxcLmN3D8galVKWmQX+Yu23OKVBleBy6B/AMKU/a1KDKbUtPQfyMMaN+/P6ESnQ==","shasum":"531ca8b728afce2d394334461e59767cb8d4c4c0","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.8.tgz","fileCount":26,"unpackedSize":21218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCquUjzVrWxTzEV077UFLqESkGcBgHOdEXzIGoSW/rFKAIgBnLGCGt31eZyCz9c4bZhnhdHziAghuLJo27twmfDeCg="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.8_1693734305067_0.05771990812228123"},"_hasShrinkwrap":false},"0.0.9":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.9","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","toolbox","utils","tool","utilities"],"devDependencies":{"@typescript-eslint/eslint-plugin":"^6.6.0","@typescript-eslint/parser":"^6.6.0","eslint":"^8.48.0","typescript":"^5.2.2","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","build:tests":"tsc -p tsconfig.json","test":"vitest","lint":"eslint ."},"gitHead":"5657be67a03ad8ab7b0a0ae96a170afc44ac7911","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.9","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-58OsYi0O+pG7337D2Vkxm+Sn3i4cE8P/jKjN9ARw9fDb0RROt+v06h+i3ExWIQ4yUn2LFb1+eGLGOhGcjQpPZQ==","shasum":"ba97c6f1e298e8dedc6a0b8f01f142a36cf5869f","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.9.tgz","fileCount":53,"unpackedSize":45997,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZC+bSCjoCEkkP/1SjpIp88aGtnBmxw7IMCvVe6eY6UgIgJdGu+kGPBFAuXyDqgkHEf079TtzOsB/IYqCMU0Gt7Zg="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.9_1694073651168_0.5070424363275985"},"_hasShrinkwrap":false},"0.0.10":{"name":"typescript-toolbox","packageManager":"yarn@3.6.1","version":"0.0.10","description":"Tools to leverage typescript features in code easily","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"homepage":"https://github.com/babymechanic/typescript-toolbox#readme","exports":{".":"./dist/index.js","./assertions":"./dist/src/assertions/index.js","./discriminated-union":"./dist/src/discriminated-union/index.js","./type-manipulation":"./dist/src/type-manipulation/index.js"},"typesVersions":{"*":{"assertions":["dist/src/assertions/index.d.ts"],"discriminated-union":["dist/src/discriminated-union/index.d.ts"],"type-manipulation":["dist/src/type-manipulation/index.d.ts"]}},"keywords":["typescript","nothrow","toolbox","utils","tool","utilities"],"devDependencies":{"@typescript-eslint/eslint-plugin":"^6.6.0","@typescript-eslint/parser":"^6.6.0","eslint":"^8.48.0","typescript":"^5.2.2","vitest":"^0.34.1"},"scripts":{"build":"tsc -p tsconfig.build.json","build:tests":"tsc -p tsconfig.json","test":"vitest","lint":"eslint ."},"gitHead":"b2e7edbd9bca06692f5f46c806c85063f629fca0","bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"_id":"typescript-toolbox@0.0.10","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-oyyuWHYWl/gMkKCU0l+UQQar0k0nybrfHHtAC7lvUX9NB806RJhgc2NAFqz2u6rv/kBstjYjLXTicF6ktauFzg==","shasum":"f060c4848d2bc82f9b8cf1a7cf1e2b3c532c4d75","tarball":"https://registry.npmjs.org/typescript-toolbox/-/typescript-toolbox-0.0.10.tgz","fileCount":53,"unpackedSize":45990,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSUoITSJPZ5UwN65uUSKjctLDd3xNwa7O5ySKVPohT5QIgTqp94obqu/UHddMWnjK7LZWLHUnGXz2V8drC9iiae+Y="}]},"_npmUser":{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"},"directories":{},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-toolbox_0.0.10_1694349074062_0.40217535228066437"},"_hasShrinkwrap":false}},"maintainers":[{"name":"mohnish.chowdhury","email":"mohnish.chowdhury@gmail.com"}],"description":"Tools to leverage typescript features in code easily","homepage":"https://github.com/babymechanic/typescript-toolbox#readme","keywords":["typescript","nothrow","toolbox","utils","tool","utilities"],"repository":{"type":"git","url":"git+https://github.com/babymechanic/typescript-toolbox.git"},"bugs":{"url":"https://github.com/babymechanic/typescript-toolbox/issues"},"readme":"![publish](https://github.com/babymechanic/typescript-toolbox/actions/workflows/publish.yml/badge.svg?branch=release)\n\n# typescript-toolbox\n\nA collection of utils to make using typescript features easier.\n\n## How to import \n\nYour can import everything or only modules that you need. e.g.\n\n```typescript\n// use this to import the root module\nimport { discriminatedUnion, typeManipulation, assertions } from 'typescript-toolbox';\n\nconst handler = discriminatedUnion.createHandler(...);\ntype Test = typeManipulation.ExtractByProp<'prop', 'test', { prop: 'test' }>;\nconst isNotNull = assertions.propsAreNotNull({}, []);\n\n// use this to import the specific module\nimport type { ExtractByProp, ExtractLast, DeepRequired } from 'typescript-toolbox/type-manipulation';\nimport { propsAreNotNull } from 'typescript-toolbox/assertions';\nimport { createHandler, createEventEmitter, chain } from 'typescript-toolbox/discriminated-union';\n```\n\n## Available utilities\n\n### typescript-toolbox/type-manipulation\n\nUtils to leverage the type system\n\n#### ExtractByProp\n\nExtracts the type in a discriminated union by the common prop.\n\n```typescript\nimport { ExtractByProp } from 'typescript-toolbox/type-manipulation';\n\ntype Success = { type: 'success' };\ntype Failure = { type: 'failure' };\n\ntype AlsoFailure = ExtractByProp<'type', 'failure', Success | Failure>;\n```\n\n#### ExtractLast\n\nExtracts the type of the last element in an array type \n\n```typescript\nimport { ExtractLast } from 'typescript-toolbox/type-manipulation';\n\ntype AlsoDate = ExtractLast<[string, number, Date]>;\n```\n\n#### PartialExcept\n\nMakes everything optional and makes the selected props required\n\n```typescript\nimport { PartialExcept } from 'typescript-toolbox/type-manipulation';\n\ntype Test = {\n    becomesRequired?: string;\n    becomesPartial: string;\n}\n\ntype Mapped = PartialExcept<Test, 'becomesRequired'>;\n// {\n//     becomesRequired: string;\n//     becomesPartial?: string | undefined;\n// }\n```\n\n#### DeepRequired\n\nMakes the object deep required\n\n```typescript\nimport { DeepRequired } from 'typescript-toolbox/type-manipulation';\n\ntype AllRequired = DeepRequired<{ grandParent?: { parent?: { child?: string | undefined } } }>;\n// { grandParent: { parent: { child: string } } }\n\n```\n\n#### typedKeys\n\nGet array of typed keys from an object\n\n```typescript\nimport { typedKeys } from 'typescript-toolbox/type-manipulation';\n\nconst keys = typedKeys({ prop1: 'test', prop2: 'test' });\n\n// type is ('prop1' | 'prop2')[]\n```\n\n### typescript-toolbox/discriminated-union\n\nTools built around discriminated unions\n\n#### chain\n\nUse this when you are dealing with a sequence of calls which results in discriminated unions.\nInstead of you having to define a guard clause after each call you can define a one time type assert. \n\n```typescript\nimport { chain } from 'typescript-toolbox/discriminated-union';\n\ntype Escape = { status: 'error'; error: string };\ntype Output1 = { status: 'output1'; message1: string[] };\ntype Output2 = { status: 'output2'; message2: string[] };\ntype Output3 = { status: 'output3'; message3: string[] };\n\n// define your escape condition and type\nconst chainSeed = chain('status', (val): val is Escape => val.status === 'error');\n\nconst func1 = async (): Promise<Escape | Output1> =>\n    ({ status: 'output1', message1: ['message1'] });\nconst func2 = async (input: Output1): Promise<Escape | Output2> =>\n    ({ status: 'output2', message2: [...input.message1, 'message2'] });\nconst func3 = async (input: Output2): Promise<Escape | Output3> =>\n    ({ status: 'output3', message3: [...input.message2, 'message3'] });\n\nconst result = await chainSeed\n    .link(func1)\n    // recieve the non escaped output of previous func return\n    // also receive a typed array of all previous function call outputs\n    .link(func2)\n    .link(func3)\n    .run();\n\n// the final result is discriminated union of escape type and the final function output\nif (result.status === 'error') {\n    console.error(result.error);\n} else {\n    console.log(result.message3);\n}\n```\n\n#### createEventEmitter\n\nCreates a typed event emitter\n\n```typescript\nimport { createEventEmitter } from 'typescript-toolbox/discriminated-union';\n\ntype Event1 = { name: 'event1'; prop1: string; };\ntype Event2 = { name: 'event2'; prop2: number; };\n\nconst eventEmitter = createEventEmitter<Event1 | Event2>();\n\n// get typed args in the callback\n// use returned function to unregister\nconst unsub1 = eventEmitter.on('event1', async (args) => {\n    console.log(args);\n});\n\nconst unsub2 = eventEmitter.on('event2', async (args) => {\n    console.log(args);\n});\n\n// restrict to the defined types and type check based on discriminated type\nawait eventEmitter.emit({ name: 'event2', prop2: 128973912 });\n```\n\n#### createHandler\n\nUse this to ensure at compile time that all types of the discriminated union have been handled.\n\n```typescript\nimport { createHandler } from 'typescript-toolbox/discriminated-union';\n\ntype SuccessResult = { status: 'success'; message: string; };\ntype ErrorResult = { status: 'error'; errorMessage: string; };\ntype WarningResult = { status: 'warning'; warnMessage: string; };\ntype Result = SuccessResult | ErrorResult | WarningResult;\n\nconst handle = createHandler<'status', Result, string>('status', {\n    error: (val) => {\n        return `The error is: ${ val.errorMessage }`;\n    },\n    success: (val) => {\n        return `The success message is: ${ val.message }`;\n    },\n    warning: (val) => {\n        return `The warning is: ${ val.warnMessage }`;\n    },\n});\n\nconst output = handle({status: 'error', errorMessage: 'something went wrong'});\n\nconsole.log(output);\n```\n\n### typescript-toolbox/assertions\n\n#### propsAreNotNull\n\nUse this for type asserting on your props\n\n```typescript\nimport { propsAreNotNull } from 'typescript-toolbox/assertions';\n\ntype TestInput = {\n    prop1?: string | undefined;\n    prop2?: string | undefined;\n}\n\nconst input: TestInput = { prop1: 'test 1', prop2: undefined };\n\nif (propsAreNotNull(input, ['prop1'])) {\n    // prop1 becomes non nullable here\n    console.log(input.prop1);\n}\n\n```\n\n# License\n\nMIT License\n\nCopyright (c) 2022 Mohnish Chowdhury\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","readmeFilename":"README.md","license":"MIT"}