Nanoscale Parts Manufacturing

    @ndhoule/nary

    2.0.0 • Public • Published

    nary CI

    Wrap a function so that it only accepts a predefined number of arguments.

    Installation

    $ component install ndhoule/nary
    $ npm install @ndhoule/nary

    API

    nary(n : number, func: Function)

    Wrap a function in a wrapper that passes a maximum of n arguments to the wrapped function.

    ['1', '2', '3'].map(nary(1, parseInt)); // => [1, 2, 3]

    License

    Released under the MIT license.

    Install

    npm i @ndhoule/nary

    DownloadsWeekly Downloads

    0

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • ndhoule