Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@travi/ioc

1.1.1 • Public • Published

ioc

extremely simple container that loosely aligns to IOC

npm license Build Status

Commitizen friendly semantic-release Greenkeeper badge

Installation

$ npm install @travi/ioc -S

Usage

Making an instance available through the container

import {register} from '@travi/ioc';
 
const instance = factory();
 
add('instance-name', instance);

Getting an instance from the container

import {use} from '@travi/ioc';
 
const instance = use('instance-name');

Install

npm i @travi/ioc

DownloadsWeekly Downloads

171

Version

1.1.1

License

MIT

Unpacked Size

5.93 kB

Total Files

8

Last publish

Collaborators

  • avatar