a-tarasyuk / simple-assert-ok

A lightweight strongly-typed `assert.ok` helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:TypeScript 100.0%