Easier node require
Weekly downloads
Readme
Instead of doing this
var http = require('http'),
myModule = require('./lib/myModule'),
User = require('./lib/models').User;
// rest of your code
you do
require("them")(function(http, myModule, User) {
// rest of you code
})
npm install them --save
You must initialize them before you use it, because you have to tell what is your root module and all the required modules should be relative to that.
require('them').init(module, [mapping]);
Example:
require('them').init(module, {
_: "underscore",
email: "./services/email",
User: "./models/models#User",
});
Example
require("them")(function(http, _, email, User) {
// you code
});
FAQs
Easier node require
The npm package them receives a total of 411 weekly downloads. As such, them popularity was classified as not popular.
We found that them 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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.