reqo
Function decorator for validating required options in an options hash.
This project mostly exists as an example of $ yo es6nm
generator-es6nm
Example
'use strict'; var reqo = ;var decoratedFunc; // Function where options.a and options.b are both required to exist. { console;} decoratedFunc = ; // Works, logs 'a:b'; // Throws a RangeError: Options must contain b;
Install
$ npm install --save reqo