cleverbox

0.0.1 • Public • Published

cleverbox

Another Dependency Injection container for Node.

Installation

$ npm install cleverbox

Features

  • Module DI container

Usage

var Cleverbox = require('cleverbox');
 
var box = new Cleverbox(config); // See below for info about how to config the container
 
// So 'greeting' is a Cleverbox component, which has a dependency on
// a 'logger' component. Both of these components are defined as 'once'
// so behave like singletons within the container...
 
box.get('greeting', {name: 'Dave'}, function(err, greetingComponent) {
 
    greetingComponent.sendGreetingToLogger(); // Sends 'Hello Dave!' to the logger
 
});
 
 

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i cleverbox

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • timneedham