open-index/open-npm huggingface dataset:
npm package: @next-generation-node/ioc-container
Description: An easy-to-use and powerful container for dependency inversions in Node.JS
Author: Alexander Rozghon
Latest version: 1.0.1

# IoC-container

An easy-to-use and powerful container for dependency inversions in Node.JS

# Examples

```js
'use strict';

const {DIContainer} = require('../');

//init names/interfaces
const IService1 = Symbol('IService1');
const IService2 = Symbol('IService2');
const IService3 = Symbol('IService3');

//init providers
const provider1 = {
  imports: [],
  factory: () => {
    console.dir(`${1} : ${'nothing'}`);
    return 1;
  },
};

const provider2 = {
  imports: [IService1],
  factory: ({[IService1]: service1}) => {
    console.dir(`${2} : ${service1}`);
    return 2;
  },
};

const provider3 = {
  imports: [IService1, IService2],
  factory: ({[IService1]: service1, [IService2]: service2}) => {
    console.dir(`For transient example: ${Date.now()}`);
    console.dir(`${3} : ${[service1, service2]}`);
    return 3;
  },
};

const container = new DIContainer()
  .addSingleton(IService1, provider1)
  .addSingleton(IService2, provider2)
  .addTransient(IService3, provider3)
  .build();

const {[IService1]: s1, [IService2]: s2, [IService3]: s3} = container;
console.dir({s1, s2, s3});

//transient example
//The factory is called every time a dependency is accessed
setTimeout(() => {
  const {[IService3]: s3_2} = container;
  return s3_2;
}, 1000);

```

## IoC Container 1.0.0:
- registering dependencies based on providers
- supported singleton/transient dependencies
- graph-based dependency building
- checking dependencies for cyclicity
npm package: @next-interactive/draft-js-inline-toolbar-plugin
Description: Toolbar Plugin for DraftJS
Author: Benjamin Kniffler
Latest version: 2.0.5

# DraftJS Toolbar Plugin

*This is a plugin for the `draft-js-plugins-editor`.*

Usage:

```js
import createInlineToolbarPlugin from 'draft-js-inline-toolbar-plugin';

const toolbarPlugin = createInlineToolbarPlugin();
```
npm package: @next-interactive/draft-js-side-toolbar-plugin
Description: Toolbar Plugin for DraftJS
Author: Benjamin Kniffler
Latest version: 2.0.6

# DraftJS Toolbar Plugin

*This is a plugin for the `draft-js-plugins-editor`.*

Usage:

```js
import createSideToolbarPlugin from 'draft-js-side-toolbar-plugin';

const toolbarPlugin = createSideToolbarPlugin();
```