Skip to content

thealien/smallbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smallbox

NPM

a lightweight container library for node.js

Node.js Version Build Status

Installation

$ npm install smallbox

Usage

var container = require('smallbox');

// register components
container.define('user:name', 'Javier');
container.define('user:surname', 'Aranda');
container.define('files:storage', 's3');

// get components
if ( container.has('user:name') ) {
  console.log( container.require('user:name') );
}

// using wildcard
container.require('user:*'); //=> { 'user:name': 'Javier', 'user:surname': 'Aranda' }

More examples are available inside the code.

Testing

The library is tested using Mocha.

$ npm test

Contributing

  1. Fork it ( https://github.com/arandaio/smallbox/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Versioning

smallbox uses Semantic Versioning 2.0.0

Contact

License

Copyright (c) 2014 Javier Aranda - Released under MIT license

About

a lightweight container library for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%