pure-fun
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

😊 pure-fun

A collection of JavaScript pure functions/helpers with zero dependencies.

Travis CI Chat

Installing

npm install pure-fun
yarn add pure-fun

Usage

import PureFun from 'pure-fun';
const mapArr = PureFun.arrays.getMappedArray({ key: 'value' });
 
import { arrays } from 'pure-fun';
const rnd = arrays.pickRandom([1, 2, 3])
 
import sleep from 'pure-fun/async';
(async () => {
  await sleep(1000);
  console.log('Slept 1s')
})();

Development

The dev env for this is Node LTS/latest with ESM (import/export) syntax as a standard. Typescript is used to ensure type safety + documentation Linting is done with eslint and testing with jest.

You can run tests locally with npm t. Every PR also builds on Travis CI under these circumstances.

Dependencies (0)

    Dev Dependencies (12)

    Package Sidebar

    Install

    npm i pure-fun

    Weekly Downloads

    2

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    218 kB

    Total Files

    424

    Last publish

    Collaborators

    • thibmaek