arg types

A very simple module to do runtime argument type checking of functions.
Usage
Installation:
Use yarn
or npm
:
$ [sudo] npm install --save arg-types
Example:
The very contrived example below would stop "33"
being returned by the function.
var argTypes = require('./')
var helloSignature = argTypes(['number', 'number', 'number'])
function hello (a, b, c) {
helloSignature(arguments)
return a + b + c
}
try {
hello(1, 2, '3')
} catch (ex) {
assert(ex.message === 'Expected "number" but got "string" at argument 3.')
}