https://github.com/morevm/utils
Collection of JS / TS utilities
https://github.com/morevm/utils
helpers typescript utils
Last synced: 5 months ago
JSON representation
Collection of JS / TS utilities
- Host: GitHub
- URL: https://github.com/morevm/utils
- Owner: MorevM
- License: other
- Created: 2022-02-14T17:57:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-15T11:23:59.000Z (over 1 year ago)
- Last Synced: 2025-04-10T21:18:26.496Z (over 1 year ago)
- Topics: helpers, typescript, utils
- Language: TypeScript
- Homepage:
- Size: 2.09 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README


[](https://opensource.org/licenses/MIT)




# @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
```sh
# 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 :)
```ts
import { clamp } from '@morev/utils';
import type { ArrayOf } from '@morev/utils';
// CJS
const { arrayShuffle } = require('@morev/utils');
```
## Acknowledgments
- [fast-copy](https://github.com/planttheidea/fast-copy) for `deepClone` and `deepCloneStrict` utilities;
- [fast-equals](https://github.com/planttheidea/fast-equals) for `deepEqual` and `deepEqualCircular` utilities;
- [ohash](https://github.com/unjs/ohash) for `hash` utility;
- [type-fest](https://github.com/sindresorhus/type-fest) for many utility types.
- `object-to-formdata` utility mostly inspired by [object-to-formdata](https://github.com/therealparmesh/object-to-formdata) package,
but public API and implementation is a bit different according to my experience and needs.
- [awaity](https://github.com/asfktz/Awaity.js) for an inspiration and initial code base of the `asyncArray` utility.
- [set-cookie-parser](https://github.com/nfriedly/set-cookie-parser/) for the basic implementation of the `parseResponseCookie` utility and tests.
- [cookie](https://github.com/jshttp/cookie) for the basic implementation of the `serializeCookie` utility and its tests.
- [compute-gcd](https://github.com/compute-io/gcd) for the implementation of the `gcd` utility and its tests.