1.0.7 • Published 2 months ago

@arpinum/defender v1.0.7

Weekly downloads
290
License
MIT
Repository
github
Last release
2 months ago

@arpinum/defender Build Status

Every absurdity has a champion to defend it.
Oliver Goldsmith

@arpinum/defender is a collection of assertions to do some runtime type checking.

Installation

npm install @arpinum/defender --save

Examples

Assertion throwing exception when not satisfied:

import { assert } from "@arpinum/defender";

assert("hello").toBeANumber(); // throws: value must be a number

Simple validation returning a boolean:

import { is } from "@arpinum/defender";

is("hello").aNumber(); // false

More examples in examples.

Docs

License

MIT

1.0.7

2 months ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago