# justo-injector

> Dependency injector.

Latest version **0.1.2** (published 2016-02-01) · 0 weekly downloads

## Install

```sh
npm install justo-injector
pnpm add justo-injector
yarn add justo-injector
bun add justo-injector
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2016-02-01 |
| First published | 2015-05-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Justo Labs |
| Maintainers | justojs |
| Keywords | Justo, Justo.js, Dependency injector, injector |

## Links

- npm: https://www.npmjs.com/package/justo-injector
- Repository: https://github.com/justojs/justo-injector
- Homepage: http://www.justojs.org
- Issues: https://github.com/justojs/justo-injector/issues
- npm.io page: https://npm.io/package/justo-injector

## Recent versions

- 0.1.2 (latest) — 2016-02-01
- 0.1.1 — 2015-10-05
- 0.1.0 — 2015-05-23

## README

[![Build Status](https://travis-ci.org/justojs/justo-injector.svg)](https://travis-ci.org/justojs/justo-injector)

Dependency injector.

*Proudly made with ♥ in Valencia, Spain, EU.*

## Functions

### hasParameter()

Checks whether a function has a specified parameter:

```
hasParameter(name : string, fn : function) : boolean
```

### getParameters()

Returns an array with the parameters:

```
getParameters(fn : function) : string[]
```

### getParameterIndex()

Returns the parameter index:

```
getParameterIndex(name : string, fn : function) : number
```

### inject()

Returns the argument array for a call:

```
inject(args : object, fn : function) : object[]
```

Example:

```
function fn(x, y, z) {}

args = inject({x: 1, y: 2}, fn);  //[1, 2, undefined]
```

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