0.0.1 • Published 8 years ago
@joegesualdo/assert v0.0.1
assert
Explicity set expectations; fail if those expectations are not met.
Install
$ npm install --save @joegesualdo/assert-js
Usage
import assert from ('@joegesualdo/assert')
let testStr = 'hello world';
assert.type(testStr, 'boolean');
//=> throws `TypeError`
Test
$ npm test
API
assert.type(testVar, type)
Name | Type | Required | Default | Description |
---|---|---|---|---|
testVar | N/A | yes | N/A | The variable you want to test |
type | String | yes | N/A | The type the variable should be |
import assert from ('@joegesualdo/assert')
let testStr = 'hello world';
assert.type(testStr, 'boolean');
//=> throws `TypeError`
Build
$ npm run build
License
MIT © Joe Gesualdo
0.0.1
8 years ago