2 functions (helpers) - grid23/korbutJS GitHub Wiki

korbutJS provides a very few but useful helpers functions, which are meant to deal with cumbersome idiosyncrasies that are oddly omnipresent in JavaScript codebases.

They are stored in the korbut.utils namespace.


A shortcut to Array.prototype.slice.call(arguments), named after ES6 spread arguments

function foo(a){
    var args = korbut.utils.spread(arguments, 1)

function es6foo(a, ...args){

foo("a", "b", "c", "d") // logs: b, c, d
es6foo("a", "b", "c", "d") // ES6-compatible browser, logs: b, c, d
⚠️ **GitHub.com Fallback** ⚠️