module-singleton
v2.0.1
Published
Throw an error when the same module loaded more than once
Downloads
122
Readme
SYNOPSIS
Prevent multiple copies of your module loaded into application.
For example, module1 would be loaded twice when the dependency graph looks like this:
--main-module
--module1
--module2
--module1USAGE
Require module-singleton at the top of your module, pass package.json.
require('module-singleton')(require('./package.json'));##LICENSE
Apache License, Version 2.0
