{"_id":"@ebec/core","_rev":"8-2136b2668d63836edbae1dbf9fff44db","name":"@ebec/core","dist-tags":{"latest":"1.3.2"},"versions":{"0.0.1":{"name":"@ebec/core","version":"0.0.1","keywords":["error","typescript","class","abstraction","exception","debug","error-handling","options","merge","build"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@0.0.1","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/Tada5hi/ebec#readme","bugs":{"url":"https://github.com/Tada5hi/ebec/issues"},"dist":{"shasum":"9e1e269e7cc7fc0626e1be0d88facfcd2d07fd0c","tarball":"https://registry.npmjs.org/@ebec/core/-/core-0.0.1.tgz","fileCount":9,"integrity":"sha512-bewnMYgFAH0qFoYWMbjcXQJbfSXcTTYa4Z/s9FpxVXUjwJUNlPgdgivlvgZ5hE2hCto6Q0LGDXxqpDQJD6ijhw==","signatures":[{"sig":"MEYCIQDJ6oz8DOkBWZYnQtw9jSzAA7wIUqc48i0wN6odFRcnDwIhALklnkkW1Vp4JqVMOipwLhPyJcc/Q1vNEtudLTt+Nfy5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50651},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"797495c24deb41fc86c9aca4cba0c40834244f2d","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"tada5hi","email":"peter.placzek1996@gmail.com"},"repository":{"url":"git+https://github.com/Tada5hi/ebec.git","type":"git"},"_npmVersion":"10.9.4","description":"Core ebec error class library.","directories":{},"_nodeVersion":"22.21.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.1_1775213217258_0.010589617539360274","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@ebec/core","version":"1.0.0","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.0.0","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/Tada5hi/ebec#readme","bugs":{"url":"https://github.com/Tada5hi/ebec/issues"},"dist":{"shasum":"d43485973b27fcb7cc1f40b9e11460009cfc6983","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.0.0.tgz","fileCount":9,"integrity":"sha512-QjuK3u/Fhdy0zLghqdpgI1xrx52eVmXgWKaS9gBvkFxd8uFrjygaBmpQXp/TUCbnaCTDMY1+mZjCRfXvvUbnNQ==","signatures":[{"sig":"MEUCICw92tH7HCc2DQ8J4GErxr7BYbybX2qQlbtlIpMhAg1MAiEAxRxO2qKD0udG0WRgRxzAFjGZINLnYR7EfXX1PnxC9Qc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50753},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"3eec0eba5ab66a5349c36f1b1ed939b358517391","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8fe28ced-e12b-45af-8581-9293619a3d40"}},"repository":{"url":"git+https://github.com/Tada5hi/ebec.git","type":"git"},"_npmVersion":"10.9.4","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0_1775214181079_0.6949300291086713","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ebec/core","version":"1.0.1","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.0.1","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/Tada5hi/ebec#readme","bugs":{"url":"https://github.com/Tada5hi/ebec/issues"},"dist":{"shasum":"ed0cb610a88bc684077caf33d7cae050501c23dd","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.0.1.tgz","fileCount":9,"integrity":"sha512-YONiuIHxImAHIBr3EHwmOfMycqSLjlb5RmKUhOPLNC9aoKL4B0JbfpFOqfpIQlexfELQvNXSWdnEYs/uRp6ytA==","signatures":[{"sig":"MEYCIQDTCu8OFoom7+ZWJ2RRlygRQPbmJD5TmKB8+iupMVpeEQIhAP1g5O+Q/uxyoq5G5mTos8PyJ7u0R7XSwxnTN6QkaMl4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50821},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"b5ad4d9160cbf3eba7e2b7472ff7c8169efa9dea","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8fe28ced-e12b-45af-8581-9293619a3d40"}},"repository":{"url":"git+https://github.com/Tada5hi/ebec.git","type":"git"},"_npmVersion":"10.9.7","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.0.1_1775482032580_0.943549537701285","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ebec/core","version":"1.1.0","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.1.0","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/Tada5hi/ebec#readme","bugs":{"url":"https://github.com/Tada5hi/ebec/issues"},"dist":{"shasum":"a9d2e2d9c021eadd7181977fa47757df60e12399","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.1.0.tgz","fileCount":9,"integrity":"sha512-00+4zWS0df0RBHNuQUixzBhYLzyqSDvBr7VsQiReT0fv2r52/mqNHcPNp4cts6O/bDIvz5O6Zw0S4jlNug9Kkw==","signatures":[{"sig":"MEUCIBnMIMv9kc1am/mR7AgejpReJ9oMyMKAHp3Fx5X03H/cAiEA8bL2nB1msOhb/0hb04ns6vxwBkd/Ts9Fn+0Ue0B+XPA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64216},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"cb054f3c29aadcea2ec7bd2114d732c155b1d30f","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8fe28ced-e12b-45af-8581-9293619a3d40"}},"repository":{"url":"git+https://github.com/Tada5hi/ebec.git","type":"git"},"_npmVersion":"10.9.7","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.1.0_1778490725958_0.28100145588827474","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ebec/core","version":"1.2.0","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.2.0","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/Tada5hi/ebec#readme","bugs":{"url":"https://github.com/Tada5hi/ebec/issues"},"dist":{"shasum":"b4f3cdcb9d328bffc1f4d7231c62caa1ca9488ed","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.2.0.tgz","fileCount":9,"integrity":"sha512-6sjSW05IEBoPCXD2HoxV8glWzebKYyGZHbHS90ktfqwQLBbHMKpcoIuJnihg1FjJc7gwU8mMOOzVkhIj2oUrVQ==","signatures":[{"sig":"MEYCIQC9MqdTnNwDXxKp/Xcs7rAm8pHt+G3F6NNaVTvLAIu3zQIhAMlnBT+nUpcXj+A0/pUBE3i4UIhrjKpZeKOQkNWj0vAx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":81159},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"613b78a436e21f5c14c250c485e0f9d1306e8db8","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8fe28ced-e12b-45af-8581-9293619a3d40"}},"repository":{"url":"git+https://github.com/Tada5hi/ebec.git","type":"git"},"_npmVersion":"10.9.8","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.2.0_1785144255962_0.6813069684404294","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@ebec/core","version":"1.3.0","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.3.0","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/tada5hi/ebec#readme","bugs":{"url":"https://github.com/tada5hi/ebec/issues"},"dist":{"shasum":"39283ee5fe9bb72075ba904e5f4d6471203a73dc","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.3.0.tgz","fileCount":9,"integrity":"sha512-Tep8kcSN7BFjAwx5j0b0xyvBOzFcdqAp5l33wllG9FVkDRKX4gvAnAlP3zeeOiuisaCc4mSK4oMV1mTbJq56hw==","signatures":[{"sig":"MEUCIGGI4L/Ef6Y+J7kzYB/tv9F+94ZeqbOle+GUlnuvGJLCAiEA5qcQFU1TjGzvm2VD9czK/SoutNs4ovHmjQCOLXxHH7E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ebec%2fcore@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":203327},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.cts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"e25b7ca69da20a5b99af3ea23e48713da87e01c3","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","typecheck":"tsc -p tsconfig.json","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f5b2eb5-5631-41c8-a6cc-0abf97ce4169"}},"repository":{"url":"git+https://github.com/tada5hi/ebec.git","type":"git"},"_npmVersion":"11.17.0","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.3.0_1786995771727_0.21842172134420346","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@ebec/core","version":"1.3.1","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"author":{"url":"https://github.com/tada5hi","name":"Peter Placzek","email":"contact@tada5hi.net"},"license":"MIT","_id":"@ebec/core@1.3.1","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"homepage":"https://github.com/tada5hi/ebec#readme","bugs":{"url":"https://github.com/tada5hi/ebec/issues"},"dist":{"shasum":"a6b63e87fbb62d1640b35c5c60a7b46753ecbbc8","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.3.1.tgz","fileCount":9,"integrity":"sha512-nb1p8IV/D/i7d8XHqkxV4CESV3RVmRFrDrJte9EReolxCJMgCK8sUh4SW2xw3GaaD3kdQRTjfQ4XNhasGvP91w==","signatures":[{"sig":"MEYCIQD66acbKZCKx3BBPLw0KLP3qWkGs8d/6U0aGiR7c80EFQIhANojmYOGzJWWtFSSWV7DhT4mtQOUU4PunF4Z+nd41dqP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ebec%2fcore@1.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":203529},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.cts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"9764e5fd58e402cdadc27420d21ac1dcb14f5f0f","scripts":{"test":"vitest run --config ./test/vitest.config.ts","build":"npm run build:js && npm run build:types","build:js":"tsdown","typecheck":"tsc -p tsconfig.json","build:types":"tsc -p tsconfig.build.json","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f5b2eb5-5631-41c8-a6cc-0abf97ce4169"}},"repository":{"url":"git+https://github.com/tada5hi/ebec.git","type":"git"},"_npmVersion":"11.17.0","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_1.3.1_1786999506186_0.6446930069820687","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@ebec/core","version":"1.3.2","type":"module","description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","author":{"name":"Peter Placzek","email":"contact@tada5hi.net","url":"https://github.com/tada5hi"},"license":"MIT","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"repository":{"type":"git","url":"git+https://github.com/tada5hi/ebec.git"},"bugs":{"url":"https://github.com/tada5hi/ebec/issues"},"homepage":"https://github.com/tada5hi/ebec#readme","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.cts","scripts":{"build":"npm run build:js && npm run build:types","build:js":"tsdown","build:types":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json","test":"vitest run --config ./test/vitest.config.ts","test:coverage":"vitest run --config ./test/vitest.config.ts --coverage"},"publishConfig":{"access":"public"},"gitHead":"743afef00ced71a8b283fd4bbde76fffca82da4e","_id":"@ebec/core@1.3.2","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-YuQ5mk6jhkA+8LSh9e0vdJ2Nez00tZqiIGe5HXv4qo0dIncvSoeovr7IM8md6dDNt1ODrwHqof4YzzJqFZLXmw==","shasum":"1477303b3bd31fce16b5fd813a9c1f3b2c474ae2","tarball":"https://registry.npmjs.org/@ebec/core/-/core-1.3.2.tgz","fileCount":9,"unpackedSize":209793,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ebec%2fcore@1.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCdTeoe7nmygNQ/1tR/0BYhSIj9G/WOxZm5P9I07pmZWgIhAJlrEL2Npt/49yzMe5LnqgbbTgnrOnXyWbSq8gho6/jZ"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f5b2eb5-5631-41c8-a6cc-0abf97ce4169"}},"directories":{},"maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.3.2_1787050004239_0.9047625972535154"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-03T10:46:57.126Z","modified":"2026-08-18T10:46:44.757Z","0.0.1":"2026-04-03T10:46:57.395Z","1.0.0":"2026-04-03T11:03:01.231Z","1.0.1":"2026-04-06T13:27:12.816Z","1.1.0":"2026-05-11T09:12:06.138Z","1.2.0":"2026-07-27T09:24:16.108Z","1.3.0":"2026-08-17T19:42:51.895Z","1.3.1":"2026-08-17T20:45:06.337Z","1.3.2":"2026-08-18T10:46:44.383Z"},"bugs":{"url":"https://github.com/tada5hi/ebec/issues"},"author":{"name":"Peter Placzek","email":"contact@tada5hi.net","url":"https://github.com/tada5hi"},"license":"MIT","homepage":"https://github.com/tada5hi/ebec#readme","keywords":["error","typescript","error-handling","exception","serialization","type-guard","interpolation","error-catalog","error-group"],"repository":{"type":"git","url":"git+https://github.com/tada5hi/ebec.git"},"description":"Extensible error class with automatic code derivation, message interpolation, error grouping, and JSON serialization.","maintainers":[{"name":"tada5hi","email":"peter.placzek1996@gmail.com"}],"readme":"# @ebec/core 🧱\n\n[![npm version](https://badge.fury.io/js/@ebec%2Fcore.svg)](https://badge.fury.io/js/@ebec%2Fcore)\n[![main](https://github.com/tada5hi/ebec/actions/workflows/main.yml/badge.svg)](https://github.com/tada5hi/ebec/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/tada5hi/ebec/branch/master/graph/badge.svg?token=HLHCWI3VO1)](https://codecov.io/gh/tada5hi/ebec)\n\nCore error class library for TypeScript. Provides `BaseError` with automatic code derivation, message interpolation, and JSON serialization. Zero runtime dependencies.\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Code Derivation](#code-derivation)\n- [Message Interpolation](#message-interpolation)\n- [Wrapping Errors](#wrapping-errors)\n- [Serialization](#serialization)\n- [Type Guards](#type-guards)\n- [Error Grouping](#error-grouping)\n- [Validation Issues](#validation-issues)\n- [Error Catalog](#error-catalog)\n- [API Reference](#api-reference)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install @ebec/core\n```\n\n## Quick Start\n\nThe constructor accepts a `string` or an `ErrorOptions` object:\n\n```typescript\nimport { BaseError } from '@ebec/core';\n\n// String message\nconst error = new BaseError('something went wrong');\n\n// Options object\nconst error = new BaseError({\n    message: 'something went wrong',\n    code: 'SOMETHING_WRONG',\n});\n\n// No arguments — defaults to message \"An error occurred\"\nconst error = new BaseError();\n```\n\n## Code Derivation\n\nWhen no `code` is provided, it is derived from the class name by converting PascalCase to CONSTANT_CASE:\n\n```typescript\nconst error = new BaseError();\nconsole.log(error.code);\n// \"BASE_ERROR\"\n\nclass NotFoundError extends BaseError {}\nconst notFound = new NotFoundError();\nconsole.log(notFound.code);\n// \"NOT_FOUND_ERROR\"\n```\n\nAn explicit code always takes priority:\n\n```typescript\nconst error = new BaseError({ code: 'CUSTOM_CODE' });\nconsole.log(error.code);\n// \"CUSTOM_CODE\"\n```\n\n## Message Interpolation\n\nUse `messageData` to fill `{placeholder}` tokens in the message. The data is used for interpolation only and is not stored on the error instance.\n\n```typescript\nconst error = new BaseError({\n    message: 'User {id} not found in {service}',\n    messageData: { id: 42, service: 'auth' },\n});\n\nconsole.log(error.message);\n// \"User 42 not found in auth\"\n```\n\nMissing keys are left as-is:\n\n```typescript\nconst error = new BaseError({\n    message: 'Missing {field}',\n    messageData: { other: 'value' },\n});\n\nconsole.log(error.message);\n// \"Missing {field}\"\n```\n\n## Wrapping Errors\n\nUse the `cause` option to preserve the original error:\n\n```typescript\ntry {\n    await db.query('...');\n} catch (err) {\n    throw new BaseError({\n        message: 'query failed',\n        code: 'DB_ERROR',\n        cause: err,\n    });\n}\n```\n\n## Serialization\n\n`toJSON()` returns a plain object with `name`, `message`, `code`, and optionally `cause`, `errors`, and `issues`. If `cause` is a `BaseError`, it is serialized recursively.\n\n```typescript\nconst cause = new BaseError({ message: 'inner', code: 'INNER' });\nconst error = new BaseError({ message: 'outer', code: 'OUTER', cause });\n\nconsole.log(JSON.stringify(error, null, 2));\n// {\n//   \"name\": \"BaseError\",\n//   \"message\": \"outer\",\n//   \"code\": \"OUTER\",\n//   \"cause\": {\n//     \"name\": \"BaseError\",\n//     \"message\": \"inner\",\n//     \"code\": \"INNER\",\n//     \"@instanceof\": [\"@ebec/core/BaseError\"]\n//   },\n//   \"@instanceof\": [\"@ebec/core/BaseError\"]\n// }\n```\n\nThe `@instanceof` key carries the class-marker chain — one `Symbol.for(...)` registry key per class in the inheritance path — as a string list, since symbols don't survive `JSON.stringify`. Use `matchesInstanceof` to match a marker against both the in-process symbol chain and the rehydrated string chain:\n\n```typescript\nimport { BASE_ERROR_INSTANCE, matchesInstanceof } from '@ebec/core';\n\nconst rehydrated = JSON.parse(JSON.stringify(new BaseError('boom')));\n\nmatchesInstanceof(rehydrated, BASE_ERROR_INSTANCE); // true\n```\n\n## Type Guards\n\nIdentity is chain-only: `isBaseError` (and every other type guard in this library) checks the `@instanceof` marker chain, not the input's shape. An object that merely *looks* like a `BaseError` — including an error from another library that happens to carry a `code` — does not match. Only errors produced by `@ebec/core` (or explicitly marked via `markInstanceof`) carry the chain, in-process and through `toJSON()`.\n\n```typescript\nimport { isBaseError, isErrorWithCode } from '@ebec/core';\n\n// Check if any value is a BaseError, by its @instanceof chain\nif (isBaseError(error)) {\n    console.log(error.code);\n}\n\n// Narrow by specific code\nif (isErrorWithCode(error, 'NOT_FOUND')) {\n    // error.code is narrowed to 'NOT_FOUND'\n}\n\n// Match against multiple codes\nif (isErrorWithCode(error, ['NOT_FOUND', 'GONE'])) {\n    // error.code is 'NOT_FOUND' | 'GONE'\n}\n```\n\n## Error Grouping\n\nUse the `errors` option to collect multiple errors into a single error:\n\n```typescript\nconst errors = [\n    new BaseError({ message: 'field \"name\" is required', code: 'VALIDATION' }),\n    new BaseError({ message: 'field \"email\" is invalid', code: 'VALIDATION' }),\n];\n\nthrow new BaseError({\n    message: 'validation failed',\n    errors,\n});\n```\n\nPlain `Error` instances work too — no wrapping needed:\n\n```typescript\nconst results = await Promise.allSettled([taskA(), taskB(), taskC()]);\nconst failures = results\n    .filter((r) => r.status === 'rejected')\n    .map((r) => r.reason);\n\nif (failures.length > 0) {\n    throw new BaseError({ message: 'batch operation failed', errors: failures });\n}\n```\n\nUse `isBaseErrorGroup` to check if an error carries grouped errors. A present but empty `errors: []` does not count as a group — the array must be non-empty:\n\n```typescript\nimport { isBaseErrorGroup } from '@ebec/core';\n\nif (isBaseErrorGroup(error)) {\n    for (const child of error.errors) {\n        console.log(child.message);\n    }\n}\n```\n\n`toJSON()` includes `errors` when present, serializing each child via its `toJSON()` method if available:\n\n```typescript\nconst error = new BaseError({\n    message: 'batch failed',\n    errors: [\n        new BaseError({ message: 'step 1', code: 'STEP_1' }),\n        new Error('step 2'),\n    ],\n});\n\nconsole.log(JSON.stringify(error, null, 2));\n// {\n//   \"name\": \"BaseError\",\n//   \"message\": \"batch failed\",\n//   \"code\": \"BASE_ERROR\",\n//   \"errors\": [\n//     { \"name\": \"BaseError\", \"message\": \"step 1\", \"code\": \"STEP_1\", \"@instanceof\": [\"@ebec/core/BaseError\"] },\n//     { \"message\": \"step 2\" }\n//   ],\n//   \"@instanceof\": [\"@ebec/core/BaseError\"]\n// }\n```\n\n## Validation Issues\n\nUse the `issues` option to attach structured validation failures, as an issue tree: every issue is either a leaf **item** or a **group** with children, and every node carries its absolute `path` from the root of the validated structure. The model is exported from the package root, so `defineIssueItem`, `flattenIssueItems`, `formatIssue`, `IssueCode` and the `Issue` types all come from `@ebec/core` directly.\n\n```typescript\nimport { BaseError, IssueCode, defineIssueItem } from '@ebec/core';\n\nthrow new BaseError({\n    message: 'validation failed',\n    code: 'VALIDATION',\n    issues: [\n        defineIssueItem({\n            code: IssueCode.REQUIRED,\n            path: ['user', 'name'],\n            message: 'Name is required',\n        }),\n    ],\n});\n```\n\n`issues` is always an array — it defaults to `[]`, so `error.issues.length` is safe on every error without a guard.\n\nThe tree is stored as given. Group nodes keep their children rather than being flattened, so a consumer decides for itself whether the grouping matters:\n\n```typescript\nimport { flattenIssueItems } from '@ebec/core';\n\nconst byField = Object.fromEntries(\n    flattenIssueItems(error.issues).map((item) => [item.path.join('.'), item.message]),\n);\n```\n\n`toJSON()` includes `issues` only when the array is non-empty, so an error that carries none does not ship a dead key. This is lossless: the omitted key rehydrates to `[]` through the constructor default. Note that `toJSON()` copies the issues array but not its elements, so the returned issue objects are live references and must not be mutated.\n\n```typescript\nconsole.log(JSON.stringify(error, null, 2));\n// {\n//   \"name\": \"BaseError\",\n//   \"message\": \"validation failed\",\n//   \"code\": \"VALIDATION\",\n//   \"issues\": [\n//     { \"type\": \"item\", \"code\": \"required\", \"path\": [\"user\", \"name\"], \"message\": \"Name is required\" }\n//   ],\n//   \"@instanceof\": [\"@ebec/core/BaseError\"]\n// }\n```\n\n## Error Catalog\n\nDefine a centralized catalog of error factories with interpolation support:\n\n```typescript\nimport { defineErrorCatalog } from '@ebec/core';\n\nconst errors = defineErrorCatalog({\n    USER_NOT_FOUND: { message: 'User {id} not found' },\n    INVALID_INPUT: { message: 'Invalid input: {reason}', code: 'VALIDATION_ERROR' },\n});\n\n// Create errors with interpolation data\nthrow errors.USER_NOT_FOUND({ id: 42 });\n// ^ message: \"User 42 not found\", code: \"USER_NOT_FOUND\"\n\n// Override via second argument\nthrow errors.INVALID_INPUT({ reason: 'email required' }, { code: 'MISSING_EMAIL' });\n// ^ message: \"Invalid input: email required\", code: \"MISSING_EMAIL\"\n```\n\nWhen `code` is not specified in the catalog entry, the key name is used as the code.\n\n## API Reference\n\n### BaseError\n\n```typescript\nclass BaseError extends Error {\n    readonly code: string;\n    readonly errors?: ReadonlyArray<Error>;\n    readonly issues: ReadonlyArray<Issue>;\n    cause?: unknown;\n\n    constructor(input?: string | ErrorOptions);\n    toJSON(): { name: string; message: string; code: string; cause?: unknown; errors?: unknown[]; issues?: readonly Issue[]; '@instanceof': string[] };\n}\n```\n\n### ErrorOptions\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `message` | `string` | Error message. Defaults to `\"An error occurred\"`. |\n| `code` | `string` | Error identifier. Derived from class name if not set. |\n| `messageData` | `Record<string, unknown>` | Data for `{placeholder}` interpolation. Not stored. |\n| `cause` | `unknown` | Underlying cause of the error. |\n| `errors` | `readonly Error[]` | Collection of errors for batch/group scenarios. |\n| `issues` | `readonly Issue[]` | Structured validation failures, as an issue tree. |\n| `stack` | `string` | Override the stack trace. |\n\n### Type Guards\n\n| Function | Returns | Description |\n|----------|---------|-------------|\n| `isBaseError(input)` | `input is IBaseError` | Chain-only: true iff the `@instanceof` chain carries the `BaseError` marker. No shape fallback — a merely Error-shaped object with a `code` no longer matches |\n| `isBaseErrorGroup(input)` | `input is IBaseErrorGroup` | `isBaseError` + non-empty `errors` array |\n| `isErrorWithCode(input, code)` | `input is IBaseError & { code: C }` | Narrows code to specific value(s) |\n| `isError(input)` | `input is Error` | Duck-type check for Error-shaped objects |\n| `isErrorOptions(input)` | `input is ErrorOptions` | Validates options shape |\n\n### Helpers\n\n| Function | Description |\n|----------|-------------|\n| `sanitizeErrorCode(input)` | Converts PascalCase to CONSTANT_CASE |\n| `extractErrorOptions(input)` | Normalizes `string \\| ErrorOptions` to `ErrorOptions` |\n| `defineErrorCatalog(definitions)` | Creates typed error factory functions |\n| `toSerializable(input)` | Converts to JSON-safe form via `toJSON()` or `{ message }` fallback |\n| `markInstanceof(target, marker)` | Appends a `Symbol.for(...)` class marker to the target's `@instanceof` chain |\n| `hasInstanceof(input, marker)` | Checks the chain for the marker symbol (strict, in-process form only) |\n| `matchesInstanceof(input, marker)` | Checks the chain for the marker symbol **or** its description string (JSON-rehydrated form) |\n| `serializeInstanceofChain(input)` | Serializes the chain to its string form, as emitted by `toJSON()` |\n\n### Issue Model\n\n| Function | Description |\n|----------|-------------|\n| `defineIssueItem(input)` | Build a leaf issue. The supplied `code` selects the required `data` shape at compile time. |\n| `defineIssueGroup(input)` | Build an issue with children. Does not rewrite child paths — that is `prefixIssuePath`'s job. |\n| `prefixIssuePath(issue, prefix)` | Rebase an issue onto a parent path, recursing into groups. Returns copies. |\n| `flattenIssueItems(issues)` | Every leaf, pre-order, grouping discarded. Returns live references. |\n| `flattenIssueGroups(issues)` | Every group, pre-order, outermost first. Returns live references. |\n| `formatIssue(issue, templates?, fallback?)` | Render a message: template → eager `message` → fallback. |\n| `isIssueItem(input)` | Structural check for a leaf. |\n| `isIssueGroup(input)` | Structural check for an issue with children; recurses. |\n| `isIssue(input)` | Either of the above. |\n\nTypes: `Issue`, `IssueItem`, `IssueGroup`, `IssueBase`, `IssueItemTyped`, `IssueItemBare`, `IssueItemRaw`, `IssueCode`, `IssueDataByCode`, `ParameterizedIssueCode`, `BareIssueCode`, `IssueMessageTemplates`, `ResolveIssueCode`, `DefineIssueItemData`, `DefineIssueItemReturn`.\n\n`IssueCode` is a default vocabulary rather than a requirement — `IssueItem['code']` is widened to `IssueCode | (string & {})`, so any string is a well-formed code. `IssueDataByCode` is augmentable via `declare module '@ebec/core'` to add typed `data` shapes for your own codes.\n\n## License\n\nMade with 💚\n\nPublished under [MIT License](./LICENSE).\n","readmeFilename":"README.md"}