Purpose
Calling function constructors with an array of arguments is difficult. Until spread params are fully supported in all browsers, newify does the job.
For a given function constructor
{ thisfirstName = firstName thislastName = lastName thisbirthYear = birthYear}
We want to easily call the function constructor like
var arr = 'john''scot' 1980var s = arr //but this will obviously not work as expected. //we need ES6 spreadvar s = ...arr
But since we can't use spread in ES5 ...
NEWIFY to the rescue!
var arr = 'john''scot' 1980var s = Student arr
Installation
npm install newify
Usage
As in the above example, just give newify
a function and an array of args
var arr = 'john''scot' 1980var s = Student arr
Run tests
make test