# @uitheory/flip

> Dead simple feature flag configuration

Latest version **0.0.1** (published 2019-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @uitheory/flip
pnpm add @uitheory/flip
yarn add @uitheory/flip
bun add @uitheory/flip
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2019-09-28 |
| First published | 2019-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | uitheory |

## Links

- npm: https://www.npmjs.com/package/@uitheory/flip
- npm.io page: https://npm.io/package/@uitheory/flip

## Recent versions

- 0.0.1 (latest) — 2019-09-28

## README

# Flip

Dead simple feature flag configuration

## Installation

```sh
  npm install --save @uitheory/flip
  #or yarn
  yarn add @uitheory/flip
```

## Usage

```js
import flip from '@uitheory/flip';

const hasFeature = flip({
  features: {
    feature1: true,
    feature2: false,
    feature3: context => context.user.isTester,
    feature4: context => context.env === 'staging',
  },
  context: {
    // context about the environment, user, etc.
    user: {
      isTester: true,
    },
    env: 'staging',
  },
});

if (hasFeature('feature1')) {
  console.log('congrats!');
}
```

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