# run-time-assertions

> Type safe assertions that work just as well in production run-times as they do in testing.

Latest version **1.5.2** (published 2024-07-17) · (MIT or CC0 1.0) license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install run-time-assertions
pnpm add run-time-assertions
yarn add run-time-assertions
bun add run-time-assertions
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.5.2 |
| Published | 2024-07-17 |
| First published | 2023-09-19 |
| Weekly downloads | 0 |
| License | (MIT or CC0 1.0) |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 68.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | electrovir |
| Maintainers | electrovir |
| Keywords | assert, equality, run time, types, type, typeof, diff, browser, nodejs, node, testing, check, primitive, object, array |

## Links

- npm: https://www.npmjs.com/package/run-time-assertions
- Repository: https://github.com/electrovir/run-time-assertions
- Issues: https://github.com/electrovir/run-time-assertions/issues
- npm.io page: https://npm.io/package/run-time-assertions

## Dependencies (3)

- [type-fest](https://npm.io/package/type-fest.md) ^4.22.0
- [expect-type](https://npm.io/package/expect-type.md) ~0.15.0
- [@augment-vir/common](https://npm.io/package/@augment-vir/common.md) ^29.3.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.5.2 (latest) — 2024-07-17
- 1.5.1 — 2024-05-16
- 1.5.0 — 2024-05-09
- 1.4.3 — 2024-05-09
- 1.4.2 — 2024-05-09
- 1.4.1 — 2024-05-09
- 1.4.0 — 2024-05-09
- 1.3.0 — 2024-05-09
- 1.2.0 — 2024-03-29
- 1.1.0 — 2024-03-20
- 1.0.0 — 2024-02-17
- 0.4.0 — 2024-02-17
- 0.3.0 — 2024-01-02
- 0.2.1 — 2023-11-20
- 0.2.0 — 2023-11-19
- … 7 more at https://npm.io/package/run-time-assertions/versions

## README

# run-time-assertions

Type safe assertions that work just as well in production run-times (both frontend and backend) as they do in testing with 100% test coverage.

Docs: https://electrovir.github.io/run-time-assertions

For example, here are some functions that this package exports:

-   `assertThrows`
-   `isInstanceOf`
-   `isDefined`
-   `diffObjects`
-   `assertRunTimeType`
-   and many more

# install

```sh
npm i run-time-assertions
```

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