1.3.0 • Published 5 months ago

mochila-ts v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

🎒 Mochila

Your Lightweight Travel Companion for TypeScript Programming

Documentation

Philosophy

At the core of Mochila's philosophy is the commitment to a "data last" approach in writing functions. This design choice enables easy composition of functions using our internal pipe utility.

Additionally, Mochila embraces currying when necessary, allowing functions to be conveniently partially applied. This flexibility enhances the overall usability of the toolkit.

import { length, multiply, pipe } from 'mochila-ts';

const doubleLength = pipe(length, multiply(2));

doubleLength([1, 2, 3]); // 6
doubleLength('abc'); // 6

Mochila not only provides robust support for TypeScript but also comes equipped with handy utilities for seamlessly handling tasks such as caching and backpressuring.

import { LRUCache } from 'mochila-ts';

const cache = new LRUCache({
  max: 100,
  ttl: 1000 * 60 * 60 * 24,
});

All the utilities are exposed as named exports from the mochila-ts package.

Installation

npm install mochila-ts
# or
yarn add mochila-ts
# or
pnpm add mochila-ts
1.2.4

5 months ago

1.2.3

5 months ago

1.3.0

5 months ago

1.2.2

5 months ago

1.2.1

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago

0.0.1

5 months ago