X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2FnthArg.js;fp=node_modules%2Fgrunt-legacy-log-utils%2Fnode_modules%2Flodash%2FnthArg.js;h=bf95dd011f8207e73208bc068d49c2fa15089ffb;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/nthArg.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/nthArg.js new file mode 100644 index 000000000..bf95dd011 --- /dev/null +++ b/node_modules/grunt-legacy-log-utils/node_modules/lodash/nthArg.js @@ -0,0 +1,25 @@ +var toInteger = require('./toInteger'); + +/** + * Creates a function that returns its nth argument. + * + * @static + * @memberOf _ + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new function. + * @example + * + * var func = _.nthArg(1); + * + * func('a', 'b', 'c'); + * // => 'b' + */ +function nthArg(n) { + n = toInteger(n); + return function() { + return arguments[n]; + }; +} + +module.exports = nthArg;