LendAndRegret/node_modules/es-toolkit/dist/compat/function/nthArg.js
2026-05-02 17:27:43 +08:00

14 lines
281 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const toInteger = require('../util/toInteger.js');
function nthArg(n = 0) {
return function (...args) {
return args.at(toInteger.toInteger(n));
};
}
exports.nthArg = nthArg;