{"_id":"typanic","_rev":"11-ccebf38cd883756461f44ab7621570b8","name":"typanic","dist-tags":{"latest":"1.0.11"},"versions":{"1.0.1":{"name":"typanic","version":"1.0.1","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.1","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"4080459a41d1b83804c867e648eac032e1ae526e","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.1.tgz","fileCount":7,"integrity":"sha512-s2h4+F8OdVM9r2GNp+CsvCZL78Db2nKEr26aMe2vWIVSR1q//j2inNuCwz1CLxyaGIkCNWj4wW7oozU6fe1DnQ==","signatures":[{"sig":"MEQCIBM4NGbjstykwQvgZL8jd2n0GWWp0uhJuqy1/DHW6dgsAiAw1iarb7UIwh5F//ikzMpL48OHi9Hof4ZDvpyGbmVbqA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17055},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"33dd5ae52b817aaae84cb7002e10a895a94c84b2","scripts":{"lint":"eslint .","test":"jasmine","build":"tsc --project tsconfig.json","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm run typecheck && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.12.1","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.1_1781004496834_0.954182566318686","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"typanic","version":"1.0.2","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.2","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"5dd7d6bbcf82686ed1a1f38e51d4e59f6e8712d1","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.2.tgz","fileCount":7,"integrity":"sha512-vajn1AyDFGf9mVYOnHg5BO3nIUC0unkvzhGEQQFIrDUQJjk1w28+ynARye/SrVgGALRipxgMNCAx5lHcAERxlw==","signatures":[{"sig":"MEYCIQDRm3tzrIwoHfel+ERvekxxWBYU0G9iAPLgImtP3x/JxQIhALS6Uo/Y4/hbpVrc4dmjhDvntYvWQIQ48fjaFtTvoYp9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20247},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"eeb07247b21f822718f66f72e151b6c18763b8a2","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.16.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.2_1781510115496_0.2328754214338673","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"typanic","version":"1.0.3","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.3","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"1ccf6f0410a2295d64a7dae82dec849970360518","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.3.tgz","fileCount":7,"integrity":"sha512-QKD8QIsDPKol2Fe/IebPNVsE4YZaqmO18UwYH5HD8DApGOOgaSqZhonokwYftGHRqEHkCndS/WGO+Zv48yaUGA==","signatures":[{"sig":"MEUCIQDSreT+Ys4mKU+1uDBAN3/qyM3qSRTEaZBX+9UvEkBlEwIgb0jgQcQKNFocXoGp1v2BSkHBeGA0HrJu1O+QH5AO90E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29247},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"d8588a29d3fdaa150e23fe9de96dcf9c2465a83b","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.16.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.3_1781533449350_0.6099840997620942","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"typanic","version":"1.0.4","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.4","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"2db6861773ce78774531fc242410b28a2a58d63e","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.4.tgz","fileCount":7,"integrity":"sha512-3VDVOo79IkpqH3fxpgJw7S4Y6T3W+JEHfG0w9ootZZ9xXm/kxJKS6ytHlCYBjhp1cruLRurjYY33ErvVxt8WrA==","signatures":[{"sig":"MEUCIDaok8dL1rlzJx3UdraNj+VmfDNVpFx14NGoUagUhOjUAiEAmAFymmZ1j/gAYyluKW3jWlQm3wb7q+8BGR+aPZQKEMs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31654},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"6c302e0fb3a1cafac05b0cb18e08a19bb89a2507","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.16.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.4_1781611088051_0.5003917173770429","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"typanic","version":"1.0.5","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.5","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"5727c5594d5ac64e848765b1e91936346041a6b0","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.5.tgz","fileCount":7,"integrity":"sha512-s/WCq1LptRwHf9PgF7hRpdAafJeYuBbOU1OU4Kwjw8pNP8fdFBMrnWHQs2Pq9AyfXge6pWCrvLIXE8+ZwNWWbA==","signatures":[{"sig":"MEUCICVeVcjoTAw+DjfgiVqqqjnqbLrlHZHwYJcM+Cxj4BrnAiEAz07iiXBDpM9fVorOgXbrKvzJq+XbbSsIaXheCKc8SJM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34770},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"303eac5c0ac7f459d6124666af16d4ddc81b2cf3","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.17.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.5_1781769512961_0.011672106268560078","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"typanic","version":"1.0.6","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.6","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"21b5c6014100a1a271fa336545146aa2b7b007a6","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.6.tgz","fileCount":7,"integrity":"sha512-qkfZUX6I7raWs6KqwE7f2VQDruxqRpFETTyjvj/zpf4ETMg062liXn09hHwZseZNRmZjJ5XKyODQBKm67Lw6zA==","signatures":[{"sig":"MEUCIFBrNkgzVRDsJGUD7dqwCd9kGbMTxUnOUNNpC/NXDnWXAiEAxW7Hdx1JWp/VgxuD2p49GIK7YlAcUw+Xnwa+EVYxEdk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47620},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"ada14743aac0b4e41118eb981f008ace4cb71fc3","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.17.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.6_1782048921612_0.1936446731910877","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"typanic","version":"1.0.7","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.7","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"605ae33ab18e48f3b2765abbeb97f0affd71c0bc","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.7.tgz","fileCount":7,"integrity":"sha512-OvuxI9+mZi/5NtQyYjqMIlxSyE4Gnm7MA+/WzTuZYp4MB2x+kbKSjXUgh/CDsi+v482ubGARjgv0v8wXr6fMIQ==","signatures":[{"sig":"MEUCIBeBF1BHEUgbEVSrdBr6GkcCVzr78CZuS7AX7L58rQbcAiEAgZV82iYehzkz34cQkV+oK1DISZePGHDJgoOTRceuPwM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48814},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"b75ad272254b6a853146c5815bf0cfb50565ce0e","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.17.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.7_1782659675381_0.4742981832188642","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"typanic","version":"1.0.8","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.8","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"c973b3b773972c9c74423c14ffc5a0cd7868fe18","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.8.tgz","fileCount":7,"integrity":"sha512-/ZR/m991p31BHv2gxcPCn9r+MegpzoGcnm+hmgmaq8V+sC3IRVmG4Lbum3jHephIM2MTrIwEETHw3pj6JHCUOQ==","signatures":[{"sig":"MEUCIQDRcPBwsIsY7WT8MXf31VXzSVcFZtvXbTeialr1liVF9AIgQDdRD1QxC31mSQrkBHalO7eyapIqotKCNKXII3pcboI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52645},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"25e6579deff7e4634b68f68032e72c50ecd11655","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.17.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.8_1782893202106_0.3097373059421671","host":"s3://npm-registry-packages-npm-production"}},"1.0.9":{"name":"typanic","version":"1.0.9","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.9","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"9b8e6b29fc56acd7eba850fa074d9fd24fdc1187","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.9.tgz","fileCount":7,"integrity":"sha512-McEHFGMHctOuXd5Z7GIRMlUh6hwnbItZBx1y1Y+N85OHSFCcg9eULz+jifeDOh/342E3cZKwx5I23x+LgStVOw==","signatures":[{"sig":"MEYCIQDdFlLbOVXiUjtsbu1nXuKFvkACxAbHSwQ/MU3bl5mUQAIhAJo5K4f6AqD/M8Etq+3cwdqtcUESrzztsMGQUzEcrhTZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70871},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"6c78a3389c14d566a0244cf256fba90d01016c6d","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"11.17.0","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.9_1783074958839_0.5923482385874468","host":"s3://npm-registry-packages-npm-production"}},"1.0.10":{"name":"typanic","version":"1.0.10","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","_id":"typanic@1.0.10","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"homepage":"https://github.com/kaspernj/typanic#readme","bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"dist":{"shasum":"538346bf48d4b3def4c187f8f2e0a6590c3964c8","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.10.tgz","fileCount":7,"integrity":"sha512-TIYWGlqtemHUMILWIgNWu/BoL3tmA7H/qfbOpo48WUm2lu5LuCakZjEqKq815I0DIybAIz1oKxvaDs6Y3VdSGw==","signatures":[{"sig":"MEUCIA7pKzKSCeDnR4eS59fk4fJkggRwF7FocZrClTryBFGIAiEA005JJeY3lDubEz1+WiwIkEFnl1J955i8EtApdfnlbKk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74745},"main":"build/index.js","type":"module","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"gitHead":"c3e86e0a6f8d40aa7249f85ead11e5546b5d89b2","scripts":{"lint":"npm run eslint && npm run typecheck","test":"jasmine","build":"tsc --project tsconfig.json","eslint":"eslint .","prepare":"npm run build","typecheck":"tsc --project tsconfig.json --noEmit","all-checks":"npm run lint && npm test","release:patch":"release-patch"},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"url":"git+https://github.com/kaspernj/typanic.git","type":"git"},"_npmVersion":"12.0.1","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","directories":{},"_nodeVersion":"26.3.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.3.0","globals":"^17.6.0","jasmine":"^6.2.0","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^25.6.0","release-patch":"^1.0.0","eslint-plugin-jsdoc":"^62.9.0"},"_npmOperationalInternal":{"tmp":"tmp/typanic_1.0.10_1787037958422_0.32439891011997535","host":"s3://npm-registry-packages-npm-production"}},"1.0.11":{"name":"typanic","version":"1.0.11","description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"license":"MIT","author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"repository":{"type":"git","url":"git+https://github.com/kaspernj/typanic.git"},"bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"homepage":"https://github.com/kaspernj/typanic#readme","type":"module","main":"build/index.js","types":"build/index.d.ts","exports":{".":{"types":"./build/index.d.ts","import":"./build/index.js"}},"scripts":{"all-checks":"npm run lint && npm test","build":"tsc --project tsconfig.json","lint":"npm run eslint && npm run typecheck","prepare":"npm run build","release:patch":"release-patch","test":"jasmine","typecheck":"tsc --project tsconfig.json --noEmit","eslint":"eslint ."},"devDependencies":{"@eslint/js":"^10.0.1","@types/node":"^25.6.0","eslint":"^10.3.0","eslint-plugin-jsdoc":"^62.9.0","globals":"^17.6.0","jasmine":"^6.2.0","release-patch":"^1.0.0","typescript":"^5.9.3"},"gitHead":"6d286ac10a2a9ef75d49d88e860d425d76609be0","_id":"typanic@1.0.11","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-8YNKwrda9yUrAtWydyBHeIy27+WBIkMVzebxEeccc00EuhCdiHcnnVwXb8Z6s0ZoadNS/hFKVk1NDGYGn52MFw==","shasum":"6ae04c455eccb38bc7b571d515c4244a617f83d4","tarball":"https://registry.npmjs.org/typanic/-/typanic-1.0.11.tgz","fileCount":7,"unpackedSize":76547,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFcZs2RWXCNsjBgENDH3loSHS9NZIwlJKTofy29zd8j7AiEA44MH5+ETnYBHyRqfBf2D3HZjJ3WAm/EpDUPySwbhH8I="}]},"_npmUser":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"directories":{},"maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typanic_1.0.11_1788700980888_0.03538757464509534"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-09T11:28:16.763Z","modified":"2026-09-06T13:23:01.168Z","1.0.1":"2026-06-09T11:28:16.970Z","1.0.2":"2026-06-15T07:55:15.661Z","1.0.3":"2026-06-15T14:24:09.547Z","1.0.4":"2026-06-16T11:58:08.229Z","1.0.5":"2026-06-18T07:58:33.125Z","1.0.6":"2026-06-21T13:35:21.753Z","1.0.7":"2026-06-28T15:14:35.543Z","1.0.8":"2026-07-01T08:06:42.266Z","1.0.9":"2026-07-03T10:35:59.008Z","1.0.10":"2026-08-18T07:25:58.560Z","1.0.11":"2026-09-06T13:23:01.017Z"},"bugs":{"url":"https://github.com/kaspernj/typanic/issues"},"author":{"name":"kaspernj","email":"kasper@diestoeckels.de"},"license":"MIT","homepage":"https://github.com/kaspernj/typanic#readme","keywords":["type","types","assert","assertion","validate","validation","cast","coerce","runtime","typecheck","guard","jsdoc","string","integer","number","boolean","throw"],"repository":{"type":"git","url":"git+https://github.com/kaspernj/typanic.git"},"description":"Forced runtime type assertions for untrusted input — get the type you expect or throw, instead of silently coercing a wrong value to \"\" / 0 / false.","maintainers":[{"name":"kaspernj","email":"kasper@diestoeckels.de"}],"readme":"# typanic\n\n> type + panic — get the type you expect, or it throws.\n\nTiny, dependency-free runtime type assertions for **untrusted input** (request\nand response bodies, webhook payloads, message/command payloads, parsed config,\nroute/query params). Instead of silently coercing a wrong value into `\"\"`, `0`,\nor `false` — which produces noise and hides a real producer bug far from where it\nhappens — `typanic` either gives you the value as the type you asked for, or\nthrows a `TypeError`.\n\n```js\n// ❌ silent, noisy, swallows malformed data\nconst name = typeof payload.name === \"string\" ? payload.name : \"\"\n\n// ✅ loud and clean\nimport {forcedString} from \"typanic\"\nconst name = forcedString(payload.name, \"name\") // throws if it isn't a string\n```\n\nFor values that are already typed/validated (a generated model accessor, a\nboundary-typed param) you don't need this at all — just use them directly.\n`typanic` is for the boundary where data is genuinely untrusted.\n\n## Install\n\n```bash\nnpm install typanic\n```\n\nESM only. Ships with TypeScript declarations (`.d.ts`) generated from JSDoc.\n\n## API\n\nEvery helper takes the value and an optional `label` used in the error message\n(`Expected <label> to be a <type> but got <actual>`).\n\n### Required — throw when the value contract is not met\n\n| Function | Returns | Notes |\n| --- | --- | --- |\n| `forcedValue(value, label?)` | `T` | narrows `T \\| null \\| undefined` to `T`; throws only for nullish input |\n| `forcedString(value, label?)` | `string` | throws unless `typeof value === \"string\"` |\n| `forcedOneOf(value, allowedValues, label?)` | `T` | throws unless `value` is one of `allowedValues` (enum / one-of) |\n| `forcedInteger(value, label?)` | `number` | accepts integers and integer-looking strings (`\"42\"`) |\n| `forcedIntegerFromString(value, label?)` | `number` | accepts safe decimal integer strings only; useful for form/query values |\n| `forcedPositiveInteger(value, label?)` | `number` | accepts safe integers greater than zero and integer-looking strings (`\"42\"`) |\n| `forcedPositiveIntegerFromString(value, label?)` | `number` | accepts safe positive decimal integer strings only |\n| `forcedStringParam(params, key, label?)` | `string` | reads a required single string from a route/query param map |\n| `forcedNonBlankStringParam(params, key, label?)` | `string` | reads a required trimmed non-blank string from a param map |\n| `forcedPositiveIntegerParam(params, key, label?)` | `number` | reads a required safe positive decimal integer from a string param map |\n| `forcedPositiveIntegerList(value, label?)` | `number[]` | parses a scalar or array list of safe positive integers |\n| `forcedNonBlankString(value, label?)` | `string` | trims and rejects blank strings |\n| `forcedFloat(value, label?)` | `number` | accepts finite numbers and numeric strings; rejects `NaN`/`Infinity` |\n| `forcedBoolean(value, label?)` | `boolean` | does **not** coerce `\"true\"`/`1` — pass a real boolean |\n| `forcedFunction(value, label?)` | `Function` | throws unless `typeof value === \"function\"` |\n| `forcedError(value, label?)` | `Error` | throws unless `value instanceof Error` |\n| `forcedArray(value, label?)` | `unknown[]` | throws unless the value is an array |\n| `forcedPlainObject(value, label?)` | `Record<string, unknown>` | accepts object-literal and null-prototype objects; rejects arrays and class instances |\n\n`forcedValue()` is the generic presence assertion for an already-typed value\nthat may be nullish, such as a lookup result. It preserves the value and its\nspecific type; use a type-specific helper instead when the input itself is\nuntrusted.\n\n```js\nimport {forcedValue} from \"typanic\"\n\nconst account = forcedValue(await Account.findById(accountId), \"account\")\n```\n\n### Error conversion\n\nUse `ensureError(value, label?)` at catch/throw boundaries where JavaScript can\nthrow strings, numbers, or other non-Error values. Error instances are returned\nunchanged. Non-Error values are wrapped in a new `Error` and preserved as\n`error.cause`.\n\nUse `errorMessage(value, label?)` when a UI or status field needs a displayable\nmessage for a caught value. String throws are already messages and are returned\nunchanged; everything else is normalized through `ensureError`.\n\n```js\nimport {errorMessage} from \"typanic\"\n\ntry {\n  await work()\n} catch (error) {\n  const message = errorMessage(error, \"work error\")\n  showError(message)\n}\n```\n\n### Optional — `null` when absent, throw when present-but-wrong-typed\n\n| Function | Returns |\n| --- | --- |\n| `optionalString(value, label?)` | `string \\| null` |\n| `optionalOneOf(value, allowedValues, label?)` | `T \\| null` |\n| `optionalInteger(value, label?)` | `number \\| null` |\n| `optionalIntegerFromString(value, label?)` | `number \\| null` |\n| `optionalPositiveInteger(value, label?)` | `number \\| null` |\n| `optionalPositiveIntegerFromString(value, label?)` | `number \\| null` |\n| `optionalStringParam(params, key, label?)` | `string \\| null` |\n| `optionalNonBlankStringParam(params, key, label?)` | `string \\| null` |\n| `optionalPositiveIntegerParam(params, key, label?)` | `number \\| null` |\n| `optionalPositiveIntegerList(value, label?)` | `number[] \\| null` |\n| `optionalNonBlankString(value, label?)` | `string \\| null` |\n| `optionalFloat(value, label?)` | `number \\| null` |\n| `optionalBoolean(value, label?)` | `boolean \\| null` |\n| `optionalFunction(value, label?)` | `Function \\| null` |\n\n`null` and `undefined` both count as \"absent\" and return `null`. A value that is\n*present* but of the wrong type still throws — absence and corruption are\ndifferent things.\n\n```js\nimport {forcedPositiveIntegerFromString, optionalString} from \"typanic\"\n\nconst cols = forcedPositiveIntegerFromString(payload.cols, \"cols\") // positive decimal string -> number, or throws\nconst cursor = optionalString(payload.cursor, \"cursor\")            // string | null\nconst status = optionalString(payload.status, \"status\") ?? \"ok\"    // default only when you truly need one\n```\n\nParam-map helpers are for route/query frameworks that expose values as\n`Record<string, string | string[] | undefined>`. They reject repeated single-value\nparams instead of picking the first value silently.\n\n```js\nimport {forcedPositiveIntegerParam, optionalPositiveIntegerList} from \"typanic\"\n\nconst projectId = forcedPositiveIntegerParam(routeParams, \"project_id\", \"Project ID\")\nconst userIds = optionalPositiveIntegerList(routeParams.user_ids, \"User IDs\") ?? []\n```\n\n## Why \"forced\"?\n\nThe value is *forced* to be the type you declared. There is no quiet fallback:\nthe data is what you expect, or your code stops at the boundary with a clear\nerror instead of carrying a silent empty string into the rest of the system.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}