# utilist

# utilist

npm npm bundle size CI codecov

A modern utility library for JavaScript and TypeScript, both for the browser and for Node.js, that helps you solve routine tasks and common problems in a fast way, therefore letting you focus on what matters (building awesome stuff!)

# Why utilist

utilist is the spiritual successor of Underscore and Lodash, but it has been built in a time when ES6+ and the latest versions of the evergreen browsers and Node.js have effectively made redundant quite a big part of the functionality of those libraries.

With this in mind, utilist is:

  • lean, as it only implements utilities that are still useful in the present times.
  • performant, because it's modular and tree-shakeable, so you only add to your bundle those bytes that you're actually using.
  • reliable and safe, for it's built without any external dependencies, and fully written in TypeScript.

# Installation

Using npm

npm install utilist

Using yarn

yarn add utilist

# Usage

utilist is exported in both CommonJS and ESM formats. This means you can import it with both require (mostly for Node.js environments) and import syntaxes.

# Example

import { shuffle } from 'utilist'; // shuffles an array

shuffle<number>([1, 2, 3, 4, 5]); // returns [2, 5, 3, 4, 1]

# List of methods