Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

truffle-expect

0.0.6 • Public • Published

truffle-expect

Simple module for ensuring expected parameters exist

install

$ npm install truffle-expect

Usage

var expect = require("truffle-expect");
 
// The object you're testing
var options = {
  example: "exists"
  another: 5
};
 
expect.options(options, ["example", "another"]); // does nothing
expect.options(options, ["example", "another", "some_other_key"]); // errors because options["some_other_key"] is undefined

install

npm i truffle-expect

Downloadsweekly downloads

7,111

version

0.0.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability