Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@produck/kit
Advanced tools
A module to create a injection for implemention of DI, IoC. It can easily build injection prototype chain. Each injection represents a job space, a problem scope. Child injection can access dependencis of its prototype injection.
It has been published as a "Dual CommonJS/ES module" package but ESM first. It can work in "node.js" and browsers. It is also very friendly with "tree shaking", using "Rollup".
A Kit, the injection is IMMUTABLE
.
$ npm install @produck/kit
As esModule,
import * as Kit from '@produck/kit';
As CommonJs,
const Kit = require('@produck/kit');
The chain is like [Child] --|> [Base] --|> [Global]
.
[Child]
to FooProvider()
.[Base]
to BarProvider()
.import * as Kit from '@produck/kit';
function BarProvider(Kit) {
console.log(Kit.Kit); // => Child Kit
console.log(Kit.version); // => @produck/kit version
console.log(Kit.foo); // => 'bar'
console.log(Kit.baz); // => 'qux'
}
function FooProvider({ Kit, version, foo }) {
// Spread
console.log(version); // => @produck/kit version.
console.log(foo); // => 'bar'
// Create a child Kit by `Base Kit`
const child = Kit('Child');
child.baz = 'qux';
// Inject
BarProvider(child);
}
// Prepare
const base = Kit.global('Base');
base.foo = 'bar';
// Inject
AnyProvider(base);
FAQs
A useful dependency injection module.
We found that @produck/kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.