smallbox
a lightweight container library for node.js
Installation
$ npm install smallbox
Usage
var container = ; // register componentscontainer;container;container; // get componentsif container console; // using wildcardcontainer; //=> { 'user:name': 'Javier', 'user:surname': 'Aranda' }
Share a container between two modules
// module_a.js var container = ;container;
// module_b.js var container = ;container; // => 'Spain'
More examples are available inside the code or tests.
Testing
The library is tested using Mocha.
$ npm test
Contributing
- Fork it ( https://github.com/javierav/smallbox/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Versioning
smallbox uses Semantic Versioning 2.0.0
License
Copyright (c) 2016 Javier Aranda - Released under MIT license