0.0.1 • Published 5 years ago

nullary v0.0.1

Weekly downloads
3
License
BSD-2-Clause
Repository
github
Last release
5 years ago

nullary: Zero-argument processing

ABOUT

nullary provides a Go context-like dependency injection API for passing arguments into a function, independent of the function's arguments.

EXAMPLE

var nullary = require('nullary');

(function() {
    var apples = { count: 3, kind: 'red delicious' };
    nullary.set(nullary.background, 'fruit', apples);
})();

(function() {
    var apples = nullary.get(nullary.background, 'fruit');
    console.log(apples);
})();

// => { count: 3, kind: 'red delicious' }

NPM

https://www.npmjs.com/package/nullary

REQUIREMENTS

LICENSE

FreeBSD

DEVELOPMENT

Test (all)

$ grunt test

Test (unit)

$ npm test

Lint

$ grunt lint