Skip to content

joegesualdo/assert-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published