easy-implements
v1.0.3
Published
Dead simple interface / data verification
Downloads
10
Readme
Dead simple interface / data verification
Alpha version, subject to random change without cause or warning.
First define your interface in seperate module:
interface/Person.js
var PersonInterface = { name: 'Person', required: { first_name: 'string', last_name: 'age', } optional: { age: 'number', } }
var PersonInterface = require('./interface/Person.js');
var Implements = require('easy-implements');
Implements(Personinterface, myObj); //Throws error if no bueno