Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / nthArg.js
1 var toInteger = require('./toInteger');
2
3 /**
4  * Creates a function that returns its nth argument.
5  *
6  * @static
7  * @memberOf _
8  * @category Util
9  * @param {number} [n=0] The index of the argument to return.
10  * @returns {Function} Returns the new function.
11  * @example
12  *
13  * var func = _.nthArg(1);
14  *
15  * func('a', 'b', 'c');
16  * // => 'b'
17  */
18 function nthArg(n) {
19   n = toInteger(n);
20   return function() {
21     return arguments[n];
22   };
23 }
24
25 module.exports = nthArg;