# radis

> A Javascript dependency injection base on Angular.js API.

Latest version **2.0.0** (published 2020-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install radis
pnpm add radis
yarn add radis
bun add radis
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-03-26 |
| First published | 2016-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 0 |
| Unpacked size | 197.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jerome Quere |
| Maintainers | jerome-quere |

## Links

- npm: https://www.npmjs.com/package/radis
- Repository: https://github.com/jerome-quere/radis
- Homepage: https://github.com/jerome-quere/radis#readme
- Issues: https://github.com/jerome-quere/radis/issues
- npm.io page: https://npm.io/package/radis

## Recent versions

- 2.0.0 (latest) — 2020-03-26
- 1.0.5 — 2018-02-06
- 1.0.4 — 2018-02-06
- 1.0.3 — 2018-02-06
- 1.0.2 — 2018-02-06
- 1.0.1 — 2018-02-06
- 1.0.0 — 2018-02-06
- 0.3.1 — 2017-09-05
- 0.3.0 — 2017-09-04
- 0.2.0 — 2016-07-08
- 0.1.3 — 2016-06-29
- 0.1.2 — 2016-06-27
- 0.1.1 — 2016-06-18
- 0.1.0 — 2016-06-16
- 0.0.3 — 2016-06-13
- … 2 more at https://npm.io/package/radis/versions

## README

<h1><a href="https://github.com/jerome-quere/radis"><img alt="Radis logo" src="http://jerome-quere.github.io/radis/images/logo.png" /></a></h1>

[![Travis](https://travis-ci.org/jerome-quere/radis.svg)](https://travis-ci.org/jerome-quere/radis)
[![Coverage Status](https://coveralls.io/repos/github/jerome-quere/radis/badge.svg?branch=master)](https://coveralls.io/github/jerome-quere/radis?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/jerome-quere/radis.svg)](https://greenkeeper.io/)

[![NPM](https://nodei.co/npm/radis.png)](https://npmjs.org/package/radis)

## Quickstart

```js

const { radis } = require('radis');


class Unicorn {
  constructor(name) {
      this.name = name;
  }
  
  poop() {
    console.log(`${this.name} poop rainbow`);
  }
}

class UnicornProvider {
    constructor($injector, name) {
        this.name = name;
    }
    setName(name) {
        this.name = name;
    }
    $get() {
        return new Unicorn(this.name);
    }
}

radis
    .module('app', [])
    .provider('alice', UnicornProvider)
    .provider('anonymousUnicorn', UnicornProvider)
    .config((anonymousUnicornProvider) => anonymousUnicornProvider.setName("paul"))
    .run((alice, anonymousUnicorn) => {
        alice.poop(); // alice poop rainbow
        anonymousUnicorn.poop(); // paul poop rainbow
    })
    .bootstrap()
;
```

## Requirement
Radis use ES6 syntax internally so it require node >= 6.

## Documentation
[Go to documentation](http://jerome-quere.github.io/radis/)

---
_Source: https://npm.io/package/radis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
