Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

must-have

Morriphi135ISC1.1.1

little module to mandate properties on a object

must, have, object, require, key, value, nested

readme

must-have

what?

A little module to mandate properties on a object.
Will throw error if listed property is not present.

install

npm install must-have --save

use

var mustHave = require('must-have');
mustHave(myObject, "name", "email");
mustHave(myObject, "works.with.nested.properties");