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.
require the file
const di = require('yadi');
add some stuff to the container
let something = () => 'hello potato';
di.add(something, 'custom name');
adds the class or function to the container, the optional custom name is recommended to manage the dependencies.
var obj = {
'dependencies': 'custom name'
};
di.inject(obj)
injects the object with whatever was in the custom name, warns if the name don't exist but continues anyway
class Potato {
get dependencies() {
return ['custom name 1', 'custom name 2']
}
}
di.inject(Potato)
injects the class potato with two dependencies, the dependencies are at the definition of the class, meaning they are accessible using static methods
var obj = {
'dependencies': {
'potato': 'custom name'
}
}
di.inject(obj)
injects the object with the object in custom name, it's available in the object as potato
di.inject('/some/directory/path');
let potato = require('/some/directory/path/potato');
console.log(potato['custom name']());
-> 'hello potato'
injects all the files in the path with whatever they need, also a single file can be passed
FAQs
Yet Another Dependency Injector
The npm package yadi receives a total of 5 weekly downloads. As such, yadi popularity was classified as not popular.
We found that yadi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.