Created
January 9, 2017 23:46
-
-
Save erayarslan/1f4b7c167137a1bc175b90d04aa0ca2e to your computer and use it in GitHub Desktop.
n3xt.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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