ptz-assert
TypeScript icon, indicating that this package has built-in type declarations

1.6.8 • Public • Published

ptz-assert

Build Status NPM codecov.io Dependency Status bitHound Score License

ptz-assert is a wrapper for npm assert

Be welcome to learn, help and play!!!

Install

Install with npm:

    $ npm install ptz-assert --save

or clone from github:

    $ git clone https://github.com/angeloocana/ptz-assert.git

Setup

    $ npm install 
    $ typings install

*Add to your typings/index.d.ts

/// <reference path="../node_modules/ptz-assert/src/typings/index.d.ts" />

Test

    $ npm test

Usage

 
import { ok, notOk, equal, notEqual, deepEqual, notDeepEqual, contains, notEmptyString, notEmptyArray, emptyArray } from "ptz-assert";
 
let obj = {test:"ok, i'm a valid obj"};
 
ok(obj);
//or test with optional message 
ok(obj, msg);
 
 
var actual = 'ab';
var expected = 'ab';
equal(actual, expected);
 
 
var list = ['a', 'b'];
contains(list, 'a');
 

Package Sidebar

Install

npm i ptz-assert

Weekly Downloads

21

Version

1.6.8

License

MIT

Last publish

Collaborators

  • angeloocana
  • alanmarcell