@morev/utils
TypeScript icon, indicating that this package has built-in type declarations

3.12.1 • Public • Published

Promo image of @morev/utils package

Stability of "master" branch License: MIT Last commit Release version GitHub Release Date Keywords

@morev/utils

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.

Installation

# Using `yarn`
yarn add @morev/utils

# Using `npm`
npm install @morev/utils

# Using `pnpm`
pnpm add @morev/utils

Usage

Just 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');

Acknowledgments

  • fast-copy for deepClone and deepCloneStrict utilities;
  • fast-equals for deepEqual and deepEqualCircular utilities;
  • ohash for hash utility;
  • type-fest for many utility types.
  • object-to-formdata utility 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 asyncArray utility.
  • set-cookie-parser for the basic implementation of the parseResponseCookie utility and tests.
  • cookie for the basic implementation of the serializeCookie utility and its tests.
  • compute-gcd for the implementation of the gcd utility and its tests.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.12.1730latest

Version History

VersionDownloads (Last 7 Days)Published
3.12.1730
3.11.11,857
3.11.0231
3.10.066
3.9.0138
3.8.010
3.7.060
3.6.05
3.5.01
3.4.01
3.3.21
3.1.01
3.0.11
2.8.11,071
2.8.01
2.7.11
2.7.01
2.6.07
2.5.010
2.4.140
2.4.01
2.3.01
2.2.038
2.1.012
2.0.5142
2.0.41
2.0.32
2.0.21
2.0.11
2.0.01

Package Sidebar

Install

npm i @morev/utils

Weekly Downloads

3,532

Version

3.12.1

License

MIT

Unpacked Size

1.09 MB

Total Files

713

Last publish

Collaborators

  • morev