source:
node_modules/es-toolkit/dist/compat/function/nthArg.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 176 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 1 | import { toInteger } from '../util/toInteger.mjs'; |
| 2 | ||
| 3 | function nthArg(n = 0) { | |
| 4 | return function (...args) { | |
| 5 | return args.at(toInteger(n)); | |
| 6 | }; | |
| 7 | } | |
| 8 | ||
| 9 | export { nthArg }; |
Note:
See TracBrowser
for help on using the repository browser.
