# toggle-it

> Implementation around the toggle-it-core.

Latest version **0.2.0** (published 2018-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install toggle-it
pnpm add toggle-it
yarn add toggle-it
bun add toggle-it
```

## 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.2.0 |
| Published | 2018-05-19 |
| First published | 2018-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | DanielsLuz |
| Maintainers | danielsluz |
| Keywords | feature-toggle, feature-flags, pattern |

## Links

- npm: https://www.npmjs.com/package/toggle-it
- Repository: https://github.com/DanielsLuz/toggle-it
- Homepage: https://github.com/DanielsLuz/toggle-it#readme
- npm.io page: https://npm.io/package/toggle-it

## Dependencies (1)

- [toggle-it-core](https://npm.io/package/toggle-it-core.md) 0.1.0

## Recent versions

- 0.2.0 (latest) — 2018-05-19
- 0.1.0 — 2018-05-16
- 0.0.1 — 2018-05-16

## README

# Toggle It

This is a wrapper around the [toggle-it-core](https://github.com/DanielsLuz/toggle-it-core).

The main purpose of this wrapper is to integrate an API request responsible to fetch the data
relative to the feature flags with the core, which checks if a feature is "on" or "off", basically.

For now, the requirements are:
1. the fetch function should be a thenable (i.e. has a then method). Most Promise based request libraries should be just fine.

## Instalation

```
yarn add toggle-it
```

## Usage

Simple example usages can be found at the [tests file](https://github.com/DanielsLuz/toggle-it/blob/master/__tests__/toggle-it.test.js).

## TODO

1. (**DONE**) ~~Make it possible to the user to customize how the JSON can be accessed on the response object.~~
2. (**DONE**) ~~Support parametrized custom functions with more complex use cases for the flags.~~
2. Support non-thenables.

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