{"_id":"@andrewcaires/decorator","_rev":"10-dc53a0201f60435660cfecb2b263bd22","name":"@andrewcaires/decorator","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"@andrewcaires/decorator","version":"1.0.0","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.0.0","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"723640a5c5daa9e7a8191dbe3d21970db4c157e2","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.0.0.tgz","fileCount":6,"integrity":"sha512-8NfQjXWA/tOYl5i62VL8ed8GdHp9B0LivgxKGGE6ZoTupyCnD33anLqElZsbuaxIbihH79wvTrDDQ4o2fIB/aw==","signatures":[{"sig":"MEYCIQDw0g8B6sdv+b14l8nXyptGCWHPqwmB0HomWyGYIk5RiQIhAN15AoVs8L34fDnTwcf0k/0IrL+nkcHWGy+fwYvyD4Wg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4270},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"1a38d074b0a407e29db21b7a1b42f0a996b42d9f","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"tsx":"^4.21.0","@andrewcaires/utils.js":"^0.4.19"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.1","@types/node":"^25.0.3","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.52.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.0.0_1767812951221_0.6449183363611648","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@andrewcaires/decorator","version":"1.0.1","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.0.1","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"d380dc7ffbc7f3643e6577ffa769b4dff069167b","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.0.1.tgz","fileCount":6,"integrity":"sha512-BEqUqsMD6nkk98r4f1H7nsgs3lRryFoF1G0lu1yPdDNuHaWxAibKlxM4OxjeGUGVbWarDilm5Hsw0SE4fQBD3w==","signatures":[{"sig":"MEQCIH5V1+OCk1wJ5Hj3UyD8x9wMyjS4gizMQnM23jW5ea7BAiAiuUx+s70TztoxMfvipby1AkJnII5SxKPmvb0lqz+JZQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4270},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"e8cd2518ee6a4937f2f2fdb1131727bca9a4ae99","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.19"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.1","@types/node":"^25.0.3","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.52.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.0.1_1767813626359_0.12685109039917108","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@andrewcaires/decorator","version":"1.0.2","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.0.2","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"b24e00fc997b32ca2342cd9d48701720de184e4d","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.0.2.tgz","fileCount":6,"integrity":"sha512-b8akCrxg9blkGAEC8UdFWy2GB8D+9+5wXOHztFDXJKP7yMSanDT8FdRECqHNpiyLhDV9vNRG96e2FiNJ7SBO4Q==","signatures":[{"sig":"MEYCIQDUUTfdM6gOz14Yf5S6tI5qkI/nFdOSOA+DhsWQC4X31wIhAPly7NvVLwJCtH4VhWjE+EK4A/AEugAGPxfyi5MQhUXX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6719},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"6995f89c1f243b8ef382b8dab4cf9142b1dbe2cd","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.20"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.1","@types/node":"^25.0.3","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.52.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.0.2_1767883757507_0.9655367840034954","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@andrewcaires/decorator","version":"1.0.3","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.0.3","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"f915e389a966d1673db5a342062fdeb8550df3ae","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.0.3.tgz","fileCount":6,"integrity":"sha512-l8WoGb8EELUoEmll7MSyZA119ZECC5c6R/SwUaXl87VFNspBx2cFof7ONeJOAsryDjy+turQ1EJhRe33nOhKbA==","signatures":[{"sig":"MEUCIB3wJip0aI8OirPFMoZ4N9kFAV9y/XaTqfRbWKHvQfZMAiEA8goffUa7EMhs59sjnFmn3y23cOtNdyS02OkjGvdRxGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6756},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"aa6c3b6006cb85a19c21fe4d1b095c0573f190fc","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.20"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.1","@types/node":"^25.0.8","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.53.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.0.3_1768322951307_0.9889886981751144","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@andrewcaires/decorator","version":"1.0.4","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.0.4","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"45428ac8e2c8e2293511bb931439e7deb0d6ceec","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.0.4.tgz","fileCount":6,"integrity":"sha512-BmAagqtDaYvFKB1/zx+OhPTE+BhoEifuOnRR7Mlubrh6oqXp9XxheZ5E/hCr2HK5ImRZwd2DSpFqGvSpOZZAHA==","signatures":[{"sig":"MEYCIQD5nRqOGtKzNy4bLM7kQLq1CTMZZjXnK2c3lPkuFQ63sAIhAJT8KSR1B5FC/BUAwgv/E0wnO69vQ34tV5ac1tFoLHz5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7312},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"3d3cf14905600492139015443c588bb657a1ab4d","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.20"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.1","@types/node":"^25.0.8","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.53.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.0.4_1768496166805_0.7871169602355441","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@andrewcaires/decorator","version":"1.1.0","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.1.0","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"efbfddeaf7d18b9f1a17efa4d9c4ca6a22a390ea","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.1.0.tgz","fileCount":6,"integrity":"sha512-+E0RONIDwqveZkca41tH6fj9T5QoOb/5MJFCuZ1zJeczsG4zH8CO5AkpKeVG0qH7QWFCGw9KAlz4dvJgV9kbaA==","signatures":[{"sig":"MEYCIQDG1NRSfRsDEfEBWvYJ44zcBbIRWQAZ+YmsTREA4bfEtQIhAPXTqzwcy3IuT2hJd2wibo75WNjD5ZzUWOh2N1T9dS0H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6750},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"18de296c22d44a9876174753b32d974e1513df71","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.25"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.2","@types/node":"^25.0.9","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.53.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.1.0_1768920891904_0.552914845958925","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@andrewcaires/decorator","version":"1.1.1","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.1.1","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"88b693797a0bb048074f79927cb3cf629eb3d3e4","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.1.1.tgz","fileCount":6,"integrity":"sha512-+KpGKldqmVJdO3n+B17YcdRrrtkQiC+vWheqA0LKDh/t6C+IWApVwx+ZYJSmncSKeg8+ma+p7qV62wVs214yAQ==","signatures":[{"sig":"MEYCIQD1r2bULbpj/yK85pLBQUnBHHlezFBCWwQBU01zVvoc7wIhAKG1WCkGGZ9xHa1kWC8sY1AbUASy5cPIiiIDqIQLVDhJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6780},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"c9d1e055368a51940a517ce220f020001f5954bc","scripts":{"build":"rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.6.0","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"24.8.0","dependencies":{"@andrewcaires/utils.js":"^0.4.25"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tslib":"^2.8.1","eslint":"^9.39.2","rollup":"^4.55.2","@types/node":"^25.0.9","rollup-plugin-dts":"^6.3.0","typescript-eslint":"^8.53.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.1.1_1768922049473_0.0964179461793846","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@andrewcaires/decorator","version":"1.2.0","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.2.0","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"1fd3f32d929e7cc838cc261bdddf87c2f0e80519","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.2.0.tgz","fileCount":6,"integrity":"sha512-plw2q28yUAq/eSlPHMs5ticNp5lrFOSmmC+8QrN01DsWvNOUD52rSRo0SMvBYTXWxs8CyT59uUhPzrVxKt9vcg==","signatures":[{"sig":"MEQCIDOE2ah5Qz/XIFROrre1qhCikvT4rlevLN18VsdXtCxxAiAjAkniLGknmCU8o5UUYxRYc7F7iI7fXcBHs0KPWmyDTQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6892},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"28af9d3cbf700309bf9e6adc10d82ea7ca4efe6a","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\" --max-warnings=0","build":"npm run lint && rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.12.1","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@andrewcaires/utils.js":"^0.5.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","tslib":"^2.8.1","eslint":"^10.4.1","rollup":"^4.60.4","@eslint/js":"^10.0.1","@types/node":"^25.9.1","rollup-plugin-dts":"^6.4.1","typescript-eslint":"^8.60.0","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.3","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.2.0_1780149027622_0.860291594680562","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@andrewcaires/decorator","version":"1.2.1","keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","_id":"@andrewcaires/decorator@1.2.1","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"dist":{"shasum":"c25a696b64ce621ea73ddebcb9dadd6b6415a3a5","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.2.1.tgz","fileCount":6,"integrity":"sha512-UnCGnI/okzwzRYc1jDnP9PzizZuzBX3XcQY0bT5MoVH4YrsGcvWROTMmAaklvRtX5unoqW8+ylu+CxwhTp6liQ==","signatures":[{"sig":"MEQCIAODn/TdbsCZ2rhHtlAf5+9JwJOb5XKdDt2Uq+/RKdAHAiBcEvO63bNuI8Nv4vzkzVHxeLEpBAQEhEdKh9XqES5S1Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7411},"main":"./dist/index.cjs.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","default":"./dist/index.cjs.js","require":"./dist/index.cjs.js"},"./package.json":"./package.json"},"gitHead":"d40f6688dce1f8ba33b0bcb868f63fe324f27602","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\" --max-warnings=0","test":"node --import tsx --test src/**/*.test.ts","build":"npm run lint && npm test && rollup --bundleConfigAsCjs -c rollup.config.js"},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"repository":{"url":"git+https://github.com/andrewcaires/npm.git","type":"git"},"_npmVersion":"11.12.1","description":"Typescript decorator library for nodejs development","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@andrewcaires/utils.js":"^0.5.8"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.0","tslib":"^2.8.1","eslint":"^10.6.0","rollup":"^4.62.2","@eslint/js":"^10.0.1","@types/node":"^26.1.0","rollup-plugin-dts":"^6.4.1","typescript-eslint":"^8.63.0","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.3","@rollup/plugin-typescript":"^12.3.0"},"_npmOperationalInternal":{"tmp":"tmp/decorator_1.2.1_1783429532476_0.3010699775746317","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@andrewcaires/decorator","version":"1.2.2","description":"Typescript decorator library for nodejs development","type":"module","main":"./dist/index.cjs.js","types":"./dist/index.d.ts","module":"./dist/index.esm.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.esm.js","require":"./dist/index.cjs.js","default":"./dist/index.cjs.js"},"./package.json":"./package.json"},"scripts":{"build":"npm run lint && npm test && rollup --bundleConfigAsCjs -c rollup.config.js","lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\" --max-warnings=0","test":"node --import tsx --test src/*.test.ts src/**/*.test.ts"},"repository":{"type":"git","url":"git+https://github.com/andrewcaires/npm.git"},"keywords":["decorator","nodejs","typescript"],"author":{"name":"Andrew Caires"},"license":"MIT","bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","dependencies":{"@andrewcaires/utils.js":"^0.5.8"},"devDependencies":{"@eslint/js":"^10.0.1","@rollup/plugin-commonjs":"^29.0.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@types/node":"^26.1.0","eslint":"^10.6.0","rollup":"^4.62.2","rollup-plugin-dts":"^6.4.1","tslib":"^2.8.1","tsx":"^4.23.0","typescript-eslint":"^8.63.0"},"gitHead":"2877a6513e608d8803b5f4dcfd05568593ff23ab","_id":"@andrewcaires/decorator@1.2.2","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-d9z639lsdiGxG6aQdERcz3ZNX9whzhDrDAcDen8a/fvEFH2RktqfvmJVDxP4vB2uYXTeR/WVZrg5X8fjh+efyQ==","shasum":"c312ae4f336bb7010b1c2c3f3caf859141822c55","tarball":"https://registry.npmjs.org/@andrewcaires/decorator/-/decorator-1.2.2.tgz","fileCount":6,"unpackedSize":13041,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCPOY15fSjv5KX3osFTajJ7uJnYRNlqtsrAQoD5orGmwQIhAPTQm/mb3J+0fNqA+5mMaIa9/fDdtiArQ+4MOwc4XTXL"}]},"_npmUser":{"name":"andrewcaires","email":"andrewcaires@live.com"},"directories":{},"maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/decorator_1.2.2_1783438091564_0.025832999527750422"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T19:09:11.117Z","modified":"2026-07-07T15:28:11.793Z","1.0.0":"2026-01-07T19:09:11.364Z","1.0.1":"2026-01-07T19:20:26.498Z","1.0.2":"2026-01-08T14:49:17.669Z","1.0.3":"2026-01-13T16:49:11.601Z","1.0.4":"2026-01-15T16:56:06.967Z","1.1.0":"2026-01-20T14:54:52.035Z","1.1.1":"2026-01-20T15:14:09.618Z","1.2.0":"2026-05-30T13:50:27.791Z","1.2.1":"2026-07-07T13:05:32.639Z","1.2.2":"2026-07-07T15:28:11.704Z"},"bugs":{"url":"https://github.com/andrewcaires/npm/issues"},"author":{"name":"Andrew Caires"},"license":"MIT","homepage":"https://github.com/andrewcaires/npm/tree/main/decorator#readme","keywords":["decorator","nodejs","typescript"],"repository":{"type":"git","url":"git+https://github.com/andrewcaires/npm.git"},"description":"Typescript decorator library for nodejs development","maintainers":[{"name":"andrewcaires","email":"andrewcaires@live.com"}],"readme":"[![npm](https://img.shields.io/npm/v/@andrewcaires/decorator?color=blue&logo=npm)](https://www.npmjs.com/package/@andrewcaires/decorator)\n[![downloads](https://img.shields.io/npm/dt/@andrewcaires/decorator?color=blue)](https://www.npmjs.com/package/@andrewcaires/decorator)\n[![size](https://img.shields.io/bundlephobia/min/@andrewcaires/decorator?color=blue)](https://www.npmjs.com/package/@andrewcaires/decorator)\n[![license](https://img.shields.io/npm/l/@andrewcaires/decorator?color=blue)](https://www.npmjs.com/package/@andrewcaires/decorator)\n\n# @andrewcaires/decorator\n\nTypeScript decorator utilities for Node.js applications.\n\nThis package provides small decorators and helpers for constructor injection, singleton classes, trait-style prototype composition, and metadata storage.\n\n## Installation\n\n```sh\nnpm i @andrewcaires/decorator\n```\n\n## TypeScript Setup\n\nThis library uses TypeScript decorators. Enable decorators in your `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true\n  }\n}\n```\n\n## Imports\n\n```ts\nimport {\n  Inject,\n  Injectable,\n  Singleton,\n  Trait,\n  getInjectionArgs,\n  isClassMethodDecoratorContext,\n  metadata,\n} from \"@andrewcaires/decorator\";\n```\n\n## Injectable\n\n`Injectable()` creates a class decorator that resolves constructor dependencies registered with `Inject()`.\n\n```ts\nimport { Inject, Injectable } from \"@andrewcaires/decorator\";\n\n@Injectable()\nclass Logger {\n\n  info(message: string): void {\n\n    console.log(message);\n  }\n}\n\n@Injectable()\nclass UserService {\n\n  constructor(@Inject(Logger) private readonly logger: Logger) {}\n\n  create(): void {\n\n    this.logger.info(\"User created\");\n  }\n}\n\nconst service = new UserService();\n\nservice.create();\n```\n\nInjected dependencies are resolved before manual constructor arguments.\n\n```ts\n@Injectable()\nclass UserService {\n\n  constructor(\n    @Inject(Logger) private readonly logger: Logger,\n    private readonly name: string,\n  ) {}\n}\n\nconst service = new UserService(\"Andrew\");\n```\n\nIn the example above, `Logger` is injected and `\"Andrew\"` is passed as the next constructor argument.\n\n## Inject\n\n`Inject(key)` creates a parameter decorator for constructor dependency injection.\n\n```ts\nclass Repository {}\n\n@Injectable()\nclass Service {\n\n  constructor(@Inject(Repository) private readonly repository: Repository) {}\n}\n```\n\nDependencies are sorted by the original parameter index, so multiple injected parameters keep the same order as the constructor signature.\n\n```ts\nclass Config {}\nclass Logger {}\n\n@Injectable()\nclass Service {\n\n  constructor(\n    @Inject(Config) private readonly config: Config,\n    @Inject(Logger) private readonly logger: Logger,\n  ) {}\n}\n```\n\n## getInjectionArgs\n\n`getInjectionArgs(target)` returns the resolved dependency instances for a class constructor.\n\nIt is used internally by `Injectable()`, but it is exported if you need to inspect or manually resolve constructor dependencies.\n\n```ts\nclass Logger {}\n\nclass Service {\n\n  constructor(public readonly logger: Logger) {}\n}\n\nInject(Logger)(Service, undefined, 0);\n\nconst args = getInjectionArgs(Service);\nconst service = new Service(...args);\n```\n\nResolved dependency instances are cached in metadata and reused for subsequent resolutions.\n\n## Singleton\n\n`Singleton()` creates a class decorator that always returns the first created instance of the decorated class.\n\n```ts\nimport { Singleton } from \"@andrewcaires/decorator\";\n\n@Singleton()\nclass ConfigService {\n\n  public readonly createdAt = Date.now();\n}\n\nconst first = new ConfigService();\nconst second = new ConfigService();\n\nconsole.log(first === second); // true\n```\n\nOnly the first constructor call initializes the instance. Later calls return the stored instance.\n\n## Trait\n\n`Trait(...constructors)` copies prototype members from one or more classes to the decorated class.\n\n```ts\nimport { Trait } from \"@andrewcaires/decorator\";\n\nclass CanGreet {\n\n  greet(): string {\n\n    return \"hello\";\n  }\n}\n\n@Trait(CanGreet)\nclass Person {}\n\nconst person = new Person() as Person & CanGreet;\n\nconsole.log(person.greet()); // hello\n```\n\nThe source class `constructor` property is not copied.\n\nWhen multiple traits define the same property name, later traits overwrite earlier descriptors.\n\n## metadata\n\n`metadata(key, target, value)` stores and returns metadata by `symbol` key and owner.\n\nThe owner can be a class constructor, an object instance, or a `symbol`.\n\n```ts\nimport { metadata } from \"@andrewcaires/decorator\";\n\nconst key = Symbol(\"settings\");\n\nclass Service {}\n\nconst settings = metadata(key, Service, { enabled: true });\nconst sameSettings = metadata(key, new Service(), { enabled: false });\n\nconsole.log(settings === sameSettings); // true\nconsole.log(sameSettings.enabled); // true\n```\n\nThe first value stored for a given key and owner is preserved, including falsy values such as `false`, `0`, and `\"\"`.\n\n```ts\nconst key = Symbol(\"flag\");\nconst owner = Symbol(\"owner\");\n\nmetadata(key, owner, false);\n\nconsole.log(metadata(key, owner, true)); // false\n```\n\n## isClassMethodDecoratorContext\n\n`isClassMethodDecoratorContext(value)` is a type guard for standard class method decorator contexts.\n\n```ts\nimport { isClassMethodDecoratorContext } from \"@andrewcaires/decorator\";\n\nfunction decorator(value: unknown, context: unknown): void {\n\n  if (isClassMethodDecoratorContext(context)) {\n\n    console.log(context.kind); // method\n    console.log(context.name);\n  }\n}\n```\n\nIt returns `true` when the value is an object with:\n\n* `kind` equal to `\"method\"`\n* `name`\n* `addInitializer`\n\n## Exported Keys And Types\n\nThe package also exports internal symbols and types used by the decorators:\n\n* `Injection`\n* `InjectionKey`\n* `SingletonKey`\n\nThese are mainly useful for advanced integrations or tests.\n\n## API Reference\n\n```ts\nconst Inject: (key: TypeAnyConstructor) => ParameterDecorator;\n\nconst Injectable: <T extends TypeAnyConstructor>() => TypeAnyFunction<T>;\n\nconst getInjectionArgs: (target: TypeAnyConstructor) => Array<any>;\n\nconst Singleton: <T extends TypeAnyConstructor>() => TypeAnyFunction<T>;\n\nconst Trait: (...constructors: Array<TypeAnyConstructor>) => ClassDecorator;\n\nconst metadata: <T = unknown>(key: symbol, target: object | symbol, value: T) => T;\n\nconst isClassMethodDecoratorContext: (value: unknown) => value is ClassMethodDecoratorContext;\n```\n\n## Scripts\n\n```sh\nnpm test\nnpm run lint\nnpm run build\n```\n\n## License\n\n[MIT](https://www.npmjs.com/package/@andrewcaires/decorator)\n","readmeFilename":"README.md"}