1.0.2 • Published 4 years ago
di-util v1.0.2
Installing
npm
npm install --save di-util
yarn
yarn add di-util
Usage
Example:
var DIUtil = require('di-util);
console.log(DIUtil.env);
DIUtil.register('key1', [1, 2], true)
console.log(DIUtil.key1); // => [1, 2]
var resolveFn = DIUtil.resolve(['key1', function (a, b, c) {
console.log('a', a);
console.log('b', b);
console.log('c', c);
}])
resolveFn(11, 22, 33);
// =>
// 'a' [1, 2]
// 'b' 11
// 'c' 22
DIUtil.unregister('key1');
console.log(DIUtil.key1); // => undefined