Skip to content

Verdier/depend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Depend

Depend is a dependency injection system.

Installation

npm install depend

Usage

depend = require('depend');

depend.add('service1', function () {
    return /* the service */;
});

depend.add('service2', function (service1) {
    /* depends on service1 */
    return /* the service */;
});

var service2 = depend.get('service2');

Testing

depend.inject('service1', function () {
    return /* mock service */
})

var service2 = depend.get('service2');

About

Dependency injection for node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published