0.0.1 • Published 8 years ago

@joegesualdo/assert v0.0.1

Weekly downloads
-
License
-
Repository
github
Last release
8 years ago

assert Build Status

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)

NameTypeRequiredDefaultDescription
testVarN/AyesN/AThe variable you want to test
typeStringyesN/AThe 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