moxie-expect

0.0.3 • Public • Published

moxie-expect

Simple module for ensuring expected parameters exist

install

$ npm install moxie-expect

Usage

var expect = require("moxie-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

Readme

Keywords

Package Sidebar

Install

npm i moxie-expect

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

2.36 kB

Total Files

4

Last publish

Collaborators

  • marlonhanks