# invertism

> A dependency inversion utility

Latest version **0.0.1** (published 2013-10-20) · BSD license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2013-10-20 |
| First published | 2013-10-20 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | joshski |

## Links

- npm: https://www.npmjs.com/package/invertism
- npm.io page: https://npm.io/package/invertism

## Recent versions

- 0.0.1 (latest) — 2013-10-20

## README

# Invertism

A dependency inversion utility for JavaScript.

Use invertism for [partial appliction](http://en.wikipedia.org/wiki/Partial_application) of constructors and other functions, where arguments are injected from on a set of named services.

## Install

    npm install invertism

## Usage

    invertism = require 'invertism'
    
    services = {
        time () = '12:34'
        display (text) = "[#(text)]"
    }
    
    Clock (time, display) =
        this.time = time
        this.display = display
    
    Clock.prototype.read () =
        this.display(this.time())
      
    Bound Clock = invertism.bind(Clock, services)
    
    clock = @new Bound Clock () // no arguments!
    clock.read()                // '[12:34]'

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