# thing-assert

> Thing model assert

Latest version **1.1.0** (published 2019-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install thing-assert
pnpm add thing-assert
yarn add thing-assert
bun add thing-assert
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-12-21 |
| First published | 2019-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jsonma |
| Maintainers | jsonma |
| Keywords | thing, thing-model, thing model, thing-assert, assert, thing assert |

## Links

- npm: https://www.npmjs.com/package/thing-assert
- Repository: https://github.com/JsonMa/thing-assert
- Homepage: https://github.com/JsonMa/thing-assert#readme
- Issues: https://github.com/JsonMa/thing-assert/issues
- npm.io page: https://npm.io/package/thing-assert

## Recent versions

- 1.1.0 (latest) — 2019-12-21
- 1.0.1 — 2019-10-08
- 1.0.0 — 2019-10-08
- 1.0.4 — 2019-10-08

## README

# thing-assert

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/JsonMa/thing-assert/blob/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/thing-assert.svg?style=flat)](https://www.npmjs.com/package/thing-assert)
[![Build Status](https://www.travis-ci.org/JsonMa/thing-assert.svg?branch=master)](https://www.travis-ci.org/JsonMa/thing-assert)
[![codecov](https://codecov.io/gh/JsonMa/thing-assert/branch/master/graph/badge.svg)](https://codecov.io/gh/JsonMa/thing-assert)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/JsonMa/thing-assert/pulls)
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[snyk-image]: https://snyk.io/test/npm/thing-assert/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/thing-assert
[download-image]: https://img.shields.io/npm/dm/thing-assert.svg?style=flat-square
[download-url]: https://npmjs.org/package/thing-assert

## Description

**Nodejs's assert error has no status code. Through thing-assert you can define your own error status and capture from the thrown out error object.**

## Install

```bash
$ npm i thing-assert
```

## Usage

```js
const thingAssert = require('thing-assert')

try {
  thingAssert(false, 'error message', 400)
} catch (error) {
  console.log(error.status) // output 400
}
```

## Questions & Suggestions

Please open an issue [here](https://github.com/JsonMa/thing-assert/issues).

## License

[MIT](LICENSE)

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