# ts-tiny-invariant

> Stricter version of tiny-invariant

Latest version **2.0.5** (published 2023-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install ts-tiny-invariant
pnpm add ts-tiny-invariant
yarn add ts-tiny-invariant
bun add ts-tiny-invariant
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2023-08-15 |
| First published | 2019-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | iyegoroff |
| Maintainers | iyegoroff |
| Keywords | typescript, invariant |

## Links

- npm: https://www.npmjs.com/package/ts-tiny-invariant
- Repository: https://github.com/iyegoroff/ts-tiny-invariant
- Homepage: https://github.com/iyegoroff/ts-tiny-invariant#readme
- Issues: https://github.com/iyegoroff/ts-tiny-invariant/issues
- npm.io page: https://npm.io/package/ts-tiny-invariant

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.5 (latest) — 2023-08-15
- 2.0.4 — 2022-05-28
- 2.0.3 — 2022-05-13
- 2.0.2 — 2022-05-12
- 2.0.1 — 2022-05-12
- 1.0.7 — 2022-04-27
- 1.0.5 — 2021-11-08
- 1.0.4 — 2021-11-07
- 1.0.3 — 2021-10-29
- 0.0.3 — 2019-11-02
- 0.0.2 — 2019-07-30
- 0.0.1 — 2019-07-22

## README

# ts-tiny-invariant

[![npm](https://img.shields.io/npm/v/ts-tiny-invariant)](https://npm.im/ts-tiny-invariant)
[![build](https://github.com/iyegoroff/ts-tiny-invariant/workflows/build/badge.svg)](https://github.com/iyegoroff/ts-tiny-invariant/actions/workflows/build.yml)
[![publish](https://github.com/iyegoroff/ts-tiny-invariant/workflows/publish/badge.svg)](https://github.com/iyegoroff/ts-tiny-invariant/actions/workflows/publish.yml)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/ts-tiny-invariant)
[![Bundlephobia](https://img.shields.io/bundlephobia/minzip/ts-tiny-invariant?label=min+gzip)](https://bundlephobia.com/package/ts-tiny-invariant)
[![npm](https://img.shields.io/npm/l/ts-tiny-invariant.svg?t=1495378566925)](https://www.npmjs.com/package/ts-tiny-invariant)

<!-- [![Bundlephobia](https://badgen.net/bundlephobia/minzip/ts-tiny-invariant?label=min+gzip)](https://bundlephobia.com/package/ts-tiny-invariant) -->

Stricter version of [tiny-invariant](https://github.com/alexreardon/tiny-invariant) that accepts only `boolean` condition

## Installation

`$ npm i ts-tiny-invariant`

## Usage

```ts
import invariant from 'ts-tiny-invariant'

expect(() => {
  invariant(false, 'fail')
}).toThrow('Invariant failed: fail')

expect(() => {
  invariant(true, 'pass')
}).not.toThrow()
```

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