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");