Skip to content

Instantly share code, notes, and snippets.

@erayarslan
Created January 9, 2017 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erayarslan/1f4b7c167137a1bc175b90d04aa0ca2e to your computer and use it in GitHub Desktop.
Save erayarslan/1f4b7c167137a1bc175b90d04aa0ca2e to your computer and use it in GitHub Desktop.
n3xt.js
(function () {
var n3xt = function (arr) {
var _slice = Array.prototype.slice;
(function _n(i) {
return i != arr.length ? (function () {
arr[i].apply(this, _slice
.call(arguments)
.concat(_n(i + 1).bind(this)));
}).bind(this) : function () {
};
})(0).apply(this, _slice
.call(arguments)
.slice(1, _slice
.call(arguments).length));
};
if (typeof exports !== "undefined") {
if (typeof module !== "undefined" && module.exports) {
exports = module.exports = n3xt;
}
exports.n3xt = n3xt;
} else {
this.n3xt = n3xt;
}
if (typeof define === 'function' && define.amd) {
define('n3xt', [], function () {
return n3xt;
});
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment