Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@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.
The npm package @produck/kit receives a total of 72 weekly downloads. As such, @produck/kit popularity was classified as not popular.
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.