Skip to content

a-tarasyuk/simple-assert-ok

Repository files navigation

simple-assert-ok

GitHub license npm version GitHub Workflow Status (with branch)

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.

About

A lightweight strongly-typed `assert.ok` helper

Resources

License

Stars

Watchers

Forks

Packages

No packages published