# readable-operators

> JS operators as functions. May be passed as parameters and improves readability.

Latest version **1.0.1** (published 2018-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install readable-operators
pnpm add readable-operators
yarn add readable-operators
bun add readable-operators
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-05-27 |
| First published | 2018-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | olaven |
| Maintainers | olaven |

## Links

- npm: https://www.npmjs.com/package/readable-operators
- Repository: https://github.com/olaven/readable-operators
- npm.io page: https://npm.io/package/readable-operators

## Recent versions

- 1.0.1 (latest) — 2018-05-27
- 1.0.0 — 2018-05-27

## README

# readable-operators
JS operators as functions. May be passed as parameters and improves readability.


## Passing as parameter 

```javascript
    const ro = require("readable-operator"); 

    let applyOperator = (operator, a, b) => 
    {
        return operator(a, b); 
    }

    console.log(applyOperator(ro.add, 10, 5)) // 15
    console.log(applyOperator(ro.subtract, 10, 5)) // 5
```

## Making things readable 

```javascript
    const ro = require("readable-operator"); 

    // The answer was correct 
    if(answer.isCorrect())
    {
        ro.add(score, 1); 
    } else 
    {
        ro.subtract(score, 1); 
    }
```

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