
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Dependency Injection Manager for javascript.
dm.js is a javascript library that implements dependency injection pattern. It could work both in node or browser.
It takes care of asynchronous creating, configuring and injecting objects aka services inside of your code.
There is a good chance to keep your application design loose coupled, well structured and flexible with dependency injection pattern.
If you are not familiar with dependency injection pattern, use wiki to get more theory info.
var DM = require("dm"),
Async = require("dm/lib/async/q"),
Loader = require("dm/lib/loader/cjs"),
dm;
dm = new DM(new Async(Q), new Loader(require), {
parameters: {
"logs": "/var/log/app/"
},
services: {
"logger": {
// this is where the loader must get a constructor for this service
"path": "./src/log/logger/polylogue.js",
// this is what calls dm must do on just created service
"calls": [
// '@' symbol is the link to another service from config
[ "addHandler", ["@handler"] ]
]
},
"handler": {
"path": "./src/log/handler/file.js",
// this is what arguments pass to the constructor
"arguments": [
{
// '%' symbol is the getter of parameter from config (defined above)
// curly braces is a kinda simple templating feature (works with '@', '#' and '%')
"path": "%{logs}/log.txt"
}
]
}
}
});
dm
.get("logger")
.then(function(logger) {
// now we got instantiated and configured logger
logger.info("Hello! It works!");
});
DM can:
Full syntax definition you can find in the wiki.
There is a wiki for dive deep with dm usage, syntax and ideology. Also, you can check the API docs.
All developing version are available to install from npm as dm@x.y.z-rc
.
To publish new release candidate (rc abbr) just do npm publish --tag x.y.z-rc
and bump version in package.json x.y.z-rc0
.
FAQs
Dependency Injection Manager
The npm package dm receives a total of 69 weekly downloads. As such, dm popularity was classified as not popular.
We found that dm 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
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.