0.3.2 • Published 4 years ago

anyioc v0.3.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

anyioc

Build Status npm npm.io

Another simple ioc framework for javascript/typescript.

Install

for Node

npm install anyioc

for Browser

Use packed file dist.browser/anyioc.js.

Usage

import { ServiceProvider } from "anyioc";
const provider = new ServiceProvider();
provider.registerSingleton('the key', ioc => 102); // ioc will be scoped ServiceProvider
value = provider.get('the key'); // 102

There are some predefined key you can use direct, but you still can overwrite it:

  • ioc - get current scoped ServiceProvider instance.
  • provider - alias of ioc
0.3.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago