npm.io
0.0.1 • Published 3 years ago

@yafh/assert

Licence
MIT
Version
0.0.1
Deps
2
Size
15 kB
Vulns
0
Weekly
0
Stars
1

@yafh/assert

A simple assertion library for nodejs or browser.

Why not use chai?

  • esm support
  • typescript support
  • lightweight

Installation

npm install @yafh/assert

Usage

import { assert } from '@yafh/assert';

const foo: string | undefined = 'foo';

assert(foo);

foo // foo is string

Keywords