# sketch-module-invariant

> A sketch module to handle truthys; similar to Facebook's invariant.

Latest version **0.0.3** (published 2017-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install sketch-module-invariant
pnpm add sketch-module-invariant
yarn add sketch-module-invariant
bun add sketch-module-invariant
```

## 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.3 |
| Published | 2017-07-31 |
| First published | 2017-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Butts |
| Maintainers | buames |

## Links

- npm: https://www.npmjs.com/package/sketch-module-invariant
- Repository: https://github.com/buames/sketch-module-invariant
- Homepage: https://github.com/buames/sketch-module-invariant#readme
- Issues: https://github.com/buames/sketch-module-invariant/issues
- npm.io page: https://npm.io/package/sketch-module-invariant

## Recent versions

- 0.0.3 (latest) — 2017-07-31
- 0.0.2 — 2017-07-30
- 0.0.11 — 2017-07-26

## README

# Sketch Module Invariant

A sketch module to handle truthys; similar to Facebook's invariant.

### Usage

```js
import invariant from 'sketch-module-invariant'

// No errors
invariant(someTruthyVal, { message: 'This will not throw'})

// This will throw an error with this message
invariant(someFalseyVal, { title: 'This will throw an error with this message.', message: 'Nothing to sync!', button: 'Okay' })
```

### Options

| Options = { }  | Type | Description |
| :---         | :---         | :---         |
| title  | `string` | The title of the alert.  |
| message  | `string` | The message of the alert. |
| button  | `string` | The button label of the alert.  |


### Installation

#### npm

```sh
npm --save-dev sketch-module-invariant
```

#### yarn

```sh
yarn add --dev sketch-module-invariant
```

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