
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
containerr.js
Advanced tools
This library include a simple container for manage dependency injection
/**
* Check if the dependence is in the container
*
* @param key
* @returns {boolean}
* @throws Error: The key must be a string
*/
has(key);
/**
* Get dependence
*
* @param key
* @returns {boolean}
* @throws Error: The key must be a string
* @throws Error: $key is not in the container
*/
get(key);
/**
* Load dependence
*
* @param key
* @param object
* @returns {boolean}
* @throws Error: The key must be a string
* @throws Error: $key is already in the container
*/
share(key, object);
const { Containerr } = require('./containerr');
let container = new Containerr();
let dependence = {
name: 'dependence1'
};
let key = 'dependence1';
let key2 = 'dependence2';
let key3 = 'dependence2';
container.has(key); //false
container.share(key, dependence); //true
container.share(key2, () => {
return { obj: 'obj' };
}); //true
container.has(key); //true
container.get(key); //return dependence variable
container.get(key2); //return dependence variable
container.share(key, dependence); //Exception = Error: key is already in the container
container.get(key3); //Exception = Error: key is not in the container
FAQs
A simple container for manage dependency injection.
We found that containerr.js 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.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.