condense
This library is a manifestation against so much hated
Array.prototype.slice.call(arguments)
. Library provides decorator function
that can be used to condense all the rest parameters of a function into a
last one:
var condense = var apply =
Which is basically an alternative to writing this:
var { "use strict"; var params = Arrayprototypeslice return f}
Also desugared version of upcoming rest parameters feature (that hopefully
will kill arguments
):
{ "use strict"; return f}
Now install this library and never ever write
Array.prototype.slice.call(arguments)
again! And yes it's slower but if it's
highly unlikely to be a bottlneck in you program and if it will turn out to
be you can always optimize by replacing back to you know what.
Install
npm install condense