0.2.1 • Published 5 years ago

@pakal/arity v0.2.1

Weekly downloads
68
License
MIT
Repository
github
Last release
5 years ago

@pakal/arity

Source Code Version MIT License Bundle Size TypeScript

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.