@pakal/arity
v0.2.1
Published
Arity is package from Pakal library
Downloads
101
Maintainers
Readme
@pakal/arity
Arity is package from Pakal library
Install
$ yarn add @pakal/arity
Or
$ npm install --save @pakal/arity
Use
Module
import {
default as arity
} from '@pakal/arity';
Browser
<script src="https://unpkg.com/@pakal/arity/bundle.umd.min.js"></script>
let {
arity
} = _;
Examples
let fn = arity((...args) => args, 3);
fn('a', 'b', 'c', 'd'); // => ['a', 'b', 'c', 'd']
fn('a', 'b', 'c'); // => ['a', 'b', 'c']
fn('a', 'b'); // => ['a', 'b']
fn.length; // => 3
License
Copyright © Yisrael Eliev, Licensed under the MIT license.