easy-implements

Dead simple interface / data verification

Usage no npm install needed!

<script type="module">
  import easyImplements from 'https://cdn.skypack.dev/easy-implements';
</script>

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