{"_id":"phpdie","_rev":"16-3b16df8b4281a506b36f346cdafb8f08","name":"phpdie","dist-tags":{"latest":"1.7.0"},"versions":{"1.2.1":{"name":"phpdie","version":"1.2.1","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.1","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"0dc4184ca6f7ba169ab7d06ef7afd71c2c52faac","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.1.tgz","fileCount":15,"integrity":"sha512-3W/bi9jpPCBDYQEaZqj0llMc1mqPOPwMYDdC41mL/uIMJzgVEdruoKXFk2jfqk1Cld/yk9jQgkIspUFWyXALuQ==","signatures":[{"sig":"MEYCIQCnkhTNuUPYBGE1qUvQ5Ge66pxMVjNE889HWG405hP5SgIhAKamWTzFyDvEedjToU6oDipjxxL6xUCIbyNdOY8xAeBY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11714},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"8888c53d30ce94aee961533a3ee7c2ba2bb6c64b","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"6.14.18","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.1_1720519833083_0.8909523009618356","host":"s3://npm-registry-packages"}},"1.2.4":{"name":"phpdie","version":"1.2.4","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.4","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"c0845fcb738c0cddfb06999c8f3cf5bf30ee7f97","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.4.tgz","fileCount":12,"integrity":"sha512-+MOR7zsCBm484XQntrOdn6lih9iEfr70bDZUIRK/Sw0GKmIvJflWPr/xAOeOcZV1irjbdJsdjjjU7SFDd7h2wQ==","signatures":[{"sig":"MEUCIHuHPvixo5etVICYASzIIFu4cGk6PpYDpTiZA3eq5xK4AiEA1ciRU+HkuMowI+MFvaSLREt4qGD7SVUc7S2vuwPVQ70=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9623},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"7db193db3b91ce77a951b97ffc94f6be1a6235cd","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.1","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.4_1721960522862_0.9290655456603971","host":"s3://npm-registry-packages"}},"1.2.5":{"name":"phpdie","version":"1.2.5","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.5","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"16743f2eadd7061630ba1ffa0cda0777553584fa","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.5.tgz","fileCount":12,"integrity":"sha512-zRWrzWO0DnFZ3Pr0x4X7UTNT0rsFCv1WsmFjMXuowWriAsnE+k8YxDn+09UxWy+xwKxCOWTD/4Q357rW6L9B9Q==","signatures":[{"sig":"MEYCIQDbpPjLFOOuOOPtm1I6Y+e8iwZr26C8fcyzT59ksJyrFwIhAN/+Zd1r4MZskSnF905tYA5x3/A+g4dtXqYWEsySuFo7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9702},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"8ac0cdaf12b03d06bdecea8e54582141b8372473","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.1","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.5_1721960636782_0.965209293613619","host":"s3://npm-registry-packages"}},"1.2.10":{"name":"phpdie","version":"1.2.10","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.10","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"12d643f4b00a36047d9ceab54287c2dc7fa56760","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.10.tgz","fileCount":12,"integrity":"sha512-k9Fsze8JXe5vZ2WPIq5Y3MHG7RuUngdlzAG9FRnt/s8zWk3Wyt7shnZH8CirG1kaR3CJCH7FXU1Y5MXoVbleRA==","signatures":[{"sig":"MEQCIHC7Qpga3GBWZ3XFfx9Y11JbZ/AH9ficPsDLytrk7Ur/AiAuX2KC59UgSLiChoAEF5+QL8H6h4E5plqCCT5+f7evaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9714},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"b05d942e53c89da5ae7f3134fc7edf46ffa0ef07","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.5.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.10_1722693091646_0.34203298393382675","host":"s3://npm-registry-packages"}},"1.2.12":{"name":"phpdie","version":"1.2.12","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.12","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"6bd963a415d14e1094f410cbd70e3dc72f42f483","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.12.tgz","fileCount":13,"integrity":"sha512-0ev1DpZZwADRGhfe9agsO+tf6D30DF7u69YSb0CNg2nbGml58yc6uDtsznylRxyDcowtOxe/G3Se+NtVgYLk6w==","signatures":[{"sig":"MEUCID/IjgrgZk48KDEGfRvOnkGafODFGpeSnD+inmytgN3PAiEA5cKkopVuNcZNmecfqCuE2YtbKI+4bWy8+ndh0Yph6ko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10855},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"359f75a0447eff7b04601eeafbbb5309952664c7","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.5.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.12_1722712940855_0.2890775918051296","host":"s3://npm-registry-packages"}},"1.2.13":{"name":"phpdie","version":"1.2.13","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.13","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"787251a39fcb5399eb202c7e3f0877f0f59bbac2","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.13.tgz","fileCount":8,"integrity":"sha512-jGizWQRNB377zlRU66XD6s67+LIx3iszPZJNcGtasKKsIeGs1RAy7QILewRx/ERSCPrXdeVm718VFJJvpn8Ayw==","signatures":[{"sig":"MEQCIGe9138076o+CJEj5zUQbAYffUJVrwbfisqLNqMVC7p4AiBoUCr1WWYpDf3wZ9gNcS/xkjdeGWAmw97vhPa3yXUxgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8535},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"ae6109b2a00562e46a56f1a71417ace5547851d2","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.5.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.13_1728463438456_0.30527806324386275","host":"s3://npm-registry-packages"}},"1.2.14":{"name":"phpdie","version":"1.2.14","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.14","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"6e05c4407d1dbb3613f6c0014ea84e1686d2f7f1","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.14.tgz","fileCount":8,"integrity":"sha512-H+8HLaLRtWW+y3dd/rxE7G8x6g9r5zFpDKUfb6MyOi+hNFkSNbFT5Antl4mQ8mTz51H3mlVqArpEqHLyiozjvw==","signatures":[{"sig":"MEYCIQC/oFrvtIgs5zHqAOyMdZquv0b1g8AijiS6N81WkEGngQIhAP0z+KvN3pdtAnaDfKTv8oqR1hLETIy6gJTmXolA0OY7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8547},"type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"d5beb50723a0953491b6f70a2590115f468b1d74","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.8.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"22.5.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.14_1728886935347_0.011404870226156438","host":"s3://npm-registry-packages"}},"1.2.15":{"name":"phpdie","version":"1.2.15","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.15","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"3cc2ff9d6a4e0d2edaf42caeab34aec5fd90136b","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.15.tgz","fileCount":8,"integrity":"sha512-+ZbDs7RxCWpd0fqyFWMyo92eFXVh/JQUtkBatUTd4EEUMJmDCu40UTR931+lb9HMtBJUmL815H5eILb00ezeoQ==","signatures":[{"sig":"MEUCIQCvceCPYhNqFOWZa2jwVPFgrPW8LBjXWrNduopjtoGhzAIgGVrXx0J2UuPME3HCFBjgF0znrnGLRyljKCoH8WBO9lg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8660},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"a6d17f3fec3e0aa2d390ca10c05eba44ef5e4939","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"23.6.0","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.15_1737399973788_0.23536319811619655","host":"s3://npm-registry-packages-npm-production"}},"1.2.16":{"name":"phpdie","version":"1.2.16","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.16","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"25c0988ea67d67e606619095452df1d83a2883ab","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.16.tgz","fileCount":8,"integrity":"sha512-CEhVO03QJ8s24pL/j9dCQcsijGlp8qm4PIrAvgDwjbkcYcpeL4m4qz9NI5k6uZNZRXaHuAgfAeeJYGTdu8BhmA==","signatures":[{"sig":"MEUCIDtgaeyLRTnZCcRsSwqYw1vlB3pHfCGDh42Yd8CSwBKgAiEAwthFAI99xqJ32VH1mDyX5bcnxSpXfr7HPjNNIuveB9g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8660},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"c24736f02de676dadf0caa693c35926a3443c27f","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"23.6.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.16_1737804058209_0.7977474609587007","host":"s3://npm-registry-packages-npm-production"}},"1.2.17":{"name":"phpdie","version":"1.2.17","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.17","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"2675cf7f061e511873984c5a51dd52f41a3ff3a9","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.17.tgz","fileCount":8,"integrity":"sha512-N3MxgEqpUi/pd81y6Di/NHX6K7kqCbGA9fucbM4D9U5GLcy3QWGaL42GnExeo450KwtFRlp+zKDX1VGiUIjQpw==","signatures":[{"sig":"MEQCIHDYPCC9o3JBWt23Hgf6KEK1zHElX15Sa1I+FWTCbxi0AiANQ+p4cWxyTDGbokSVeT6HKFvzLLghorW3WaRsO6rMoA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8836},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"840934a1117f6d8bf3dea02e74eb6fe1c7208863","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"23.6.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.17_1737804360768_0.6142973226270683","host":"s3://npm-registry-packages-npm-production"}},"1.2.18":{"name":"phpdie","version":"1.2.18","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"ISC","_id":"phpdie@1.2.18","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"a7bcf676e208e70ee3b1b78e973c7edcd90c99d1","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.2.18.tgz","fileCount":8,"integrity":"sha512-hj5dVaWeUxpXJ35WY4FZtKWpT9QBo6XmeXBYsI5tJO4rKqMbYNoK2eDDx+xw/klCDZ01W+NtaMAdl7tAoxNwXQ==","signatures":[{"sig":"MEUCIB5NisssKqvAnAdk86gwS9BzVhlpUqIfhsqs4fuMPRbcAiEAt4+BU/b3nl82UU4BTUEqx1iEhlKBPl+WKRMwUMLiVEo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8831},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"95feebe38177d4f53aa835c9d0b2ada9c8fb4ba9","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.2","description":"|| DIE('reason') Throws an error like PHP 's `or DIE('REASON')`, Simple error throwing in a functional dev.","directories":{},"_nodeVersion":"23.6.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.2.18_1737805848020_0.8529860668771345","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"phpdie","version":"1.3.0","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"MIT","_id":"phpdie@1.3.0","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"0d53e10a77aaafebf810a22b05607a2ba6877875","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.3.0.tgz","fileCount":8,"integrity":"sha512-1smGrRlrS0d5/E8Ji7/oBywAnWkxFJVDDAc3HB2JqIaF6VWTYFTubPDaXh6p3S1eZYAWta+xi1tBFVPMtXIH3w==","signatures":[{"sig":"MEUCIEXYDHJqb71XRzCR7LZ8ocRRKnI5zqpeM1DKlTJxurTWAiEA1xRCD7b9hxad5fNzG4YQL7IZLBG+r3YbVaxGj4vIOUY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12056},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"5f9dd1e19e0ee7d1f4583c1edbfaeb153f561210","scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.2","description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.1.6","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.3.0_1752828936881_0.20262889863062417","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"phpdie","version":"1.4.0","keywords":["throw","error","die","functional","php","pipe","or die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"MIT","_id":"phpdie@1.4.0","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"eb92bcf39ab46ebb53ade28dfec98b3639dc9539","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.4.0.tgz","fileCount":8,"integrity":"sha512-+XzFgxltb+8dc1DVoYhZsizYU/x+WqjbCTCwDr7kaMdtCLGWxKszX1/L52/Xq9Wg2u/bHlR2kE4sKzgla8zQ5w==","signatures":[{"sig":"MEYCIQDwMQpnecslDoFYmabB1cRM6ut6PE0SDUUaswTQMby0BwIhAIYp4skbNC++0mYBm88phKG2xqP1QoYMl3WkzRnyU1fj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13466},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"f52b8fbabece2eed3039852f01fb0be3f8f31a74","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@amanda-mitchell/semantic-release-npm-multiple",{"registries":{"github":{},"public":{}}}]],"branches":["main"]},"scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.3","description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.2.18","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1","@semantic-release/changelog":"^6.0.3","@amanda-mitchell/semantic-release-npm-multiple":"^3.16.0"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.4.0_1752830069352_0.019299979364012287","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"phpdie","version":"1.5.0","keywords":["throw","error","die","functional","php","pipe","or die","@snomiao/die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"MIT","_id":"phpdie@1.5.0","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"0faa9efb7a6664d7e01df1a3c431f7727d80fb65","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.5.0.tgz","fileCount":8,"integrity":"sha512-2w3/y8QEZ6nkJXCBob2DYVIidVCUkIgHSnLk457MAbEOcx3yLHqdFk4DPAe6hHjC876eRd/qQ7CSY9+hDtUYxA==","signatures":[{"sig":"MEYCIQCZU1Esebplq8FsSzut/J+VJau5Wb4H5WfLjeKefEqcLgIhAJnOpPOtjC9NcGtJcfkwMUrkS2YQKeawNv9nETLov4vk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13603},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js","require":"./dist/index.js"},"gitHead":"61fcde747ac1c19b5389246ac72eedd8ff72fc0d","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@amanda-mitchell/semantic-release-npm-multiple",{"registries":{"phpdie":{},"snodie":{}}}]],"branches":["main"]},"scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.3","description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.2.18","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1","@semantic-release/changelog":"^6.0.3","@amanda-mitchell/semantic-release-npm-multiple":"^3.16.0"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.5.0_1752830383168_0.26236639340670465","host":"s3://npm-registry-packages-npm-production"}},"1.6.0":{"name":"phpdie","version":"1.6.0","keywords":["throw","error","die","functional","php","pipe","or die","@snomiao/die"],"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"MIT","_id":"phpdie@1.6.0","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"dist":{"shasum":"3766726d3a8df106324a1c1002062e2201a1e664","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.6.0.tgz","fileCount":8,"integrity":"sha512-kVgUHFeKY7D/N7SJVmg0ES5ph9Vat/nMz3FoPL8qeiip5DnjQt4X1GVRAKX3TZvkdfMAy6J6R0dkXiB7upVS/Q==","signatures":[{"sig":"MEUCIQCLL+PyU8pu7HV3Jld2cK8D8KATM/oR6HBXbJDFSc31qgIgdR/L7QvD87oROTHUSAsE52eszN5vpbBtv7A47XMIi7k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13661},"main":"dist/index.js","type":"module","types":"./index.ts","module":"index.ts","exports":{"types":"./index.ts","import":"./dist/index.js"},"gitHead":"445314a5184deef826bdad9b714545dc2d25ded2","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@amanda-mitchell/semantic-release-npm-multiple",{"registries":{"phpdie":{"npmPublish":true},"snodie":{"npmPublish":true}}}]],"branches":["main"]},"scripts":{"test":"bun test","build":"bun build index.ts --outdir=dist","prepare":"husky","release":"bunx standard-version && git push --follow-tags && npm publish","prerelease":"bun run build && bun run test"},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"_npmVersion":"10.9.3","description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","directories":{},"_nodeVersion":"24.4.1","dependencies":{"expect-type":"^0.19.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","@types/bun":"^1.2.18","typescript":"^5.0.0","@types/jest":"^29.5.12","semantic-release":"^24.2.1","@semantic-release/changelog":"^6.0.3","@amanda-mitchell/semantic-release-npm-multiple":"^3.16.0"},"peerDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/phpdie_1.6.0_1752830476358_0.2180425918053026","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"phpdie","version":"1.7.0","description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","keywords":["throw","error","die","functional","php","pipe","or die","@snomiao/die"],"license":"MIT","author":{"name":"snomiao","email":"snomiao@gmail.com"},"type":"module","exports":{"import":"./dist/index.js","types":"./index.ts"},"main":"dist/index.js","module":"index.ts","types":"./index.ts","scripts":{"build":"bun build index.ts --outdir=dist","prerelease":"bun run build && bun run test","release":"bunx standard-version && git push --follow-tags && npm publish","test":"bun test","prepare":"husky"},"devDependencies":{"@amanda-mitchell/semantic-release-npm-multiple":"^3.16.0","@semantic-release/changelog":"^6.0.3","@semantic-release/exec":"^7.1.0","@types/bun":"^1.2.18","@types/jest":"^29.5.12","husky":"^9.1.7","semantic-release":"^24.2.1","typescript":"^5.0.0"},"peerDependencies":{"typescript":"^5.0.0"},"publishConfig":{"access":"public"},"dependencies":{"expect-type":"^0.19.0"},"release":{"branches":["main"],"plugins":["@semantic-release/commit-analyzer","@semantic-release/changelog","@semantic-release/release-notes-generator","@semantic-release/npm",["@semantic-release/exec",{"publishCmd":"npm pkg set name=@snomiao/die"}],"@semantic-release/npm","@semantic-release/github"]},"_id":"phpdie@1.7.0","gitHead":"b240e99a736d88a21176bcaa5ef903c78a71307f","_nodeVersion":"24.4.1","_npmVersion":"10.9.3","dist":{"integrity":"sha512-zAis+cJYa/Lsin8drDGQsg6Oplp8o+cDRFP00dG1lE6ncR/Ftk2hU025r6/GT0tXg5b5KAM7cwNoZGRuuwTF4Q==","shasum":"d755b77c71d6252294c465aad9f04dd6d037289e","tarball":"https://registry.npmjs.org/phpdie/-/phpdie-1.7.0.tgz","fileCount":9,"unpackedSize":13832,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGcxzbgpyCuiOAHrcInLgJTbCYgNs1GFTZSHRudHSLDNAiAjiasJymQXcX0OJJDbcYqRicwHj/D6bDc1ytcwxKL8lQ=="}]},"_npmUser":{"name":"snomiao","email":"snomiao@gmail.com"},"directories":{},"maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/phpdie_1.7.0_1752831689186_0.8704351718514356"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-09T10:10:32.947Z","modified":"2025-07-18T09:41:29.563Z","1.2.1":"2024-07-09T10:10:33.242Z","1.2.4":"2024-07-26T02:22:03.077Z","1.2.5":"2024-07-26T02:23:57.013Z","1.2.10":"2024-08-03T13:51:31.796Z","1.2.12":"2024-08-03T19:22:21.029Z","1.2.13":"2024-10-09T08:43:58.650Z","1.2.14":"2024-10-14T06:22:15.515Z","1.2.15":"2025-01-20T19:06:13.967Z","1.2.16":"2025-01-25T11:20:58.425Z","1.2.17":"2025-01-25T11:26:00.945Z","1.2.18":"2025-01-25T11:50:48.200Z","1.3.0":"2025-07-18T08:55:37.052Z","1.4.0":"2025-07-18T09:14:29.519Z","1.5.0":"2025-07-18T09:19:43.380Z","1.6.0":"2025-07-18T09:21:16.584Z","1.7.0":"2025-07-18T09:41:29.370Z"},"author":{"name":"snomiao","email":"snomiao@gmail.com"},"license":"MIT","keywords":["throw","error","die","functional","php","pipe","or die","@snomiao/die"],"description":"|| DIE('reason') Throws an error like PHP 's `OR DIE('REASON')`, Simple error throwing in a functional dev style.","maintainers":[{"name":"snomiao","email":"snomiao@gmail.com"}],"readme":"# PHPDIE aka @snomiao/die\n\n`|| DIE('reason')` Throws an error like PHP's `or DIE('REASON')`, Simple error throwing in a functional dev.\n\n## Usage\n\n```js\nimport DIE from 'phpdie'\nconst token = process.env.TOKEN ?? DIE(\"Missing Token\")\n\nconsole.log(token) // typeof token === \"string\"\n\n\n```\n\n## DIES Function\n\nThe `DIES` function allows you to call an alert function (like `alert`, `console.error`, `toast.error`, etc.) and then throw an error. This is useful for showing error messages to users before terminating execution.\n\n```js\nimport { DIES } from '@snomiao/die'\n\nconst ooops = false\n\n// With alert\nooops || DIES(alert, \"Something went wrong!\");\n\n// With console.error\nooops || DIES(console.error, \"Error:\", 404, \"Not Found\");\n\n// With toast notifications\nooops || DIES(toast.error, \"Failed to save data\");\n\n// With custom alert function\nconst showError = (msg) => { /* show error in UI */ };\nooops || DIES(showError, \"Custom error message\");\n\nooops || DIES(()=> 'anyway die');\n\n```\n\nThe `DIES` function:\n- Calls the provided alert function with the given arguments\n- Throws an Error with message \"DIES\" and the arguments stored in the `cause` property\n- Never returns (return type is `never`)\n\n## Reference\n\n### spec\n\n```js\nimport DIE from \".\";\n\nit(\"lives\", () => {\n  const token = \"123\" ?? DIE(\"Missing Token\");\n  console.log(token);\n  expect(token).toEqual(\"123\");\n});\n\nit(\"dies\", () => {\n  let err: any;\n  try {\n    const token = process.env.TOKEN ?? DIE(\"Missing Token\");\n    console.log(token);\n  } catch (e) {\n    err = e;\n  }\n  expect(err).toEqual(\"Missing Token\");\n});\n\nit(\"dies with error\", () => {\n  let err: any;\n  try {\n    const token = process.env.TOKEN ?? DIE(new Error(\"Missing Token\"));\n    console.log(token);\n  } catch (e) {\n    err = e;\n  }\n  expect(err.message).toEqual(\"Missing Token\");\n});\n\n\n```\n\n### Impl\n\n```ts\nexport function DIE(reason?: string | Error): never {\n    if (typeof reason === \"string\") {\n        const err = new Error(reason);\n        throw err.stack;\n    }\n    throw reason;\n}\n```\n","readmeFilename":"README.md"}