100+ fully typed JavaScript utilities for everyday use.
100+ TypeScript utility types.
IMPORTANT: The library is not transpiled.
By keep transpiling libraries we push web backward with legacy code which is unneeded for most of the users.
If you need to support legacy users, you can optionally transpile the library in your build pipeline.
# Using `yarn`
yarn add @morev/utils
# Using `npm`
npm install @morev/utils
# Using `pnpm`
pnpm add @morev/utilsJust import/require needed utilities/types and use them :)
import { clamp } from '@morev/utils';
import type { ArrayOf } from '@morev/utils';
// CJS
const { arrayShuffle } = require('@morev/utils');- fast-copy for
deepCloneanddeepCloneStrictutilities; - fast-equals for
deepEqualanddeepEqualCircularutilities; - ohash for
hashutility; - type-fest for many utility types.
object-to-formdatautility mostly inspired by object-to-formdata package, but public API and implementation is a bit different according to my experience and needs.- awaity for an inspiration and initial code base of the
asyncArrayutility. - set-cookie-parser for the basic implementation of the
parseResponseCookieutility and tests. - cookie for the basic implementation of the
serializeCookieutility and its tests. - compute-gcd for the implementation of the
gcdutility and its tests.