Merge pull request #1048 from zdroid/patch-1

Fix a mistype in ary
This commit is contained in:
Angelos Chalaris
2019-11-30 10:30:15 +02:00
committed by GitHub

View File

@ -5,7 +5,7 @@ tags: adapter,function,intermediate
Creates a function that accepts up to `n` arguments, ignoring any additional arguments.
Call the provided function, `fn`, with up to `n` arguments, using `Array.prototype.slice(0,n)` and the spread operator (`...`).
Call the provided function, `fn`, with up to `n` arguments, using `Array.prototype.slice(0, n)` and the spread operator (`...`).
```js
const ary = (fn, n) => (...args) => fn(...args.slice(0, n));