2.0.0 • Published 8 years ago

iadvize-ioc-library v2.0.0

Weekly downloads
32
License
iAdvize
Repository
github
Last release
8 years ago

javascript-ioc-library

iAdvize Inversion of Control container (used in desk v3 #OHYEAH).

npm

npm i iadvize-ioc-library -S

create a registry

const registry = Registry();

define core feature

registry.addCoreFeature('MyCoreFeature', [function() {

  // return public API
  return {
    method: function(){
      return Math.random() > 0.5;
    }
  };
}]);

registry.addCoreFeature('MyCoreFeature2', ['MyCoreFeature', function(MyCoreFeature2) {

  // return public API
  return {
    method: function(){
      return MyCoreFeature2.method();
    }
  };
}]);

Changelog

2.0.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago