simple-assert-ok
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

simple-assert-ok

GitHub license npm version Travis (.com) master npm downloads npm bundle size (minified) npm bundle size (minified + gzip)

A lightweight strongly-typed assert.ok helper which aims to avoid using entire assert when need to use only one ok method., assert uses CJS module system and in many cases cannot be optimized by bundlers, as a result, a bundle includes entire assert.

Installation

npm install simple-assert-ok --save

or

yarn add simple-assert-ok

Usage

assert(expression[, message])

  • @param {any} expression
  • @param {string} message
import assert from "simple-assert-ok";
assert(true, "is valid");
assert(false, "is invalid");

License and Copyright

This software is released under the terms of the MIT license.

Package Sidebar

Install

npm i simple-assert-ok

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

16.4 kB

Total Files

23

Last publish

Collaborators

  • otarasiuk