Last active
August 29, 2015 14:03
-
-
Save Fishrock123/37cc8cd3352e54abec6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Returns a non-leaking, optimizable, safe close of `arguments` | |
// usage: var args = clone_args.apply(this, arguments) | |
module.exports = function clone_args() { | |
var i = arguments.length | |
var clone = new Array(i) | |
while (i--) clone[i] = arguments[i] | |
return clone | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment