# @the-/assert

> Assert for the-framework

Latest version **15.4.1** (published 2019-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/assert
pnpm add @the-/assert
yarn add @the-/assert
bun add @the-/assert
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 15.4.1 |
| Published | 2019-04-30 |
| First published | 2019-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 38.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | lib, the |

## Links

- npm: https://www.npmjs.com/package/@the-/assert
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/assert#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/assert

## Dependencies (1)

- [invariant](https://npm.io/package/invariant.md) ^2.2.4

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 15.4.1 (latest) — 2019-04-30
- 15.2.0 — 2019-03-31
- 15.1.4 — 2019-03-31
- 15.1.3 — 2019-03-30
- 15.1.2 — 2019-03-30
- 15.1.0 — 2019-03-29
- 15.0.3 — 2019-03-21
- 15.0.2 — 2019-03-20
- 15.0.1 — 2019-03-20

## README

@the-/assert
==========

<!---
This file is generated by the-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[bd_travis_url]: http://travis-ci.org/the-labo/the
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the.svg?token=
[bd_license_url]: https://github.com/the-labo/the/blob/master/LICENSE
[bd_npm_url]: http://www.npmjs.org/package/@the-/assert
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/assert.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Assert for the-framework

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

```bash
$ npm install @the-/assert --save
```


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const { TheAssert } = require('@the-/assert')

async function tryExample() {
  const assert = new TheAssert('MyApp') //

  function sum(a, b) {
    assert(arguments.length > 0, 'must take two arguments')
    return a + b
  }

  sum() // -> new Error(`[MyApp] must take two arguments`)
}

tryExample().catch((err) => console.error(err))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide

### function
- [#bind()](./doc/api/api.md#TheAssert#bind)
- [#notNullish(value,message)](./doc/api/api.md#TheAssert#notNullish)
- [#nullish(value,message)](./doc/api/api.md#TheAssert#nullish)
- [#ok(condition,message)](./doc/api/api.md#TheAssert#ok)
- [.create(args)](./doc/api/api.md#module_@the-/assert.create)
- [.default(args)](./doc/api/api.md#module_@the-/assert.default)
### class
- [.TheAssert](./doc/api/api.md#module_@the-/assert.TheAssert)

<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

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