Coming from Remeda
Swap remeda for @vinicunca/perkakas, rename purry to curry, and pick up the extras Perkakas ships.
Perkakas tracks Remeda's function set. A typical move is an install swap, an import rename, and purry → curry.
Install
Replace remeda with @vinicunca/perkakas.
pnpm remove remeda
pnpm add @vinicunca/perkakas
npm uninstall remeda
npm install @vinicunca/perkakas
yarn remove remeda
yarn add @vinicunca/perkakas
bun remove remeda
bun add @vinicunca/perkakas
Imports
// Perkakas
import { curry, filter, map, pipe } from '@vinicunca/perkakas';
// Remeda
import { filter, map, pipe, purry } from 'remeda';
You can keep importing individual helpers. There is no default export.
purry is curry
curry is Remeda's purry: it builds the data-first / data-last pair most Perkakas functions use. It is not type-safe on its own — wrap it with your own overloads, the way the library does.
import { curry } from '@vinicunca/perkakas';
function findIndex<T>(array: Array<T>, fn: (item: T) => boolean): number;
function findIndex<T>(fn: (item: T) => boolean): (array: Array<T>) => number;
function findIndex(...args: ReadonlyArray<unknown>): unknown {
return curry(findIndexImplementation, args);
}
Perkakas-only exports
These are not in Remeda. One-line descriptions below match the JSDoc (or the source, when JSDoc is missing).
| Export | What it does |
|---|---|
curry | Remeda's purry: build data-first and data-last signatures. |
humanReadableFileSize | Format a byte count as a human-readable size (1.0 kB, 2.0 MiB). |
sleep | Return a promise that resolves after a given number of milliseconds. |
slugify | Turn a string into a URL/DOM-safe slug. |
KEY_CODES | Keyboard event.code name constants (ENTER, ESC, …). |
isBrowser | true when window is defined. |
DeepPartial | Recursive Partial<T>, exported from type.helpers. |
KEY_CODES, isBrowser, and DeepPartial have no @category tag in source, so they land under Other on the Functions page.