UNPKG

must-have

Version:

little module to mandate properties on a object

17 lines (11 loc) 375 B
must-have === ## what? A little module to mandate properties on a object. <br /> Will throw error if listed property is not present. ## install <code>npm install must-have --save</code> ## use <code>var mustHave = require('must-have');</code><br /> <code>mustHave(myObject, "name", "email");</code><br /> <code>mustHave(myObject, "works.with.nested.properties");</code>