# @appello/common

> Appello shared package with many useful features for web and mobile development

Latest version **6.0.8** (published 2026-09-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @appello/common
pnpm add @appello/common
yarn add @appello/common
bun add @appello/common
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.8 |
| Published | 2026-09-11 |
| First published | 2021-06-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 3 |
| Unpacked size | 285.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Appello Software |
| Maintainers | yaro-appello, kuzkokov, victor-razdorov |
| Keywords | appello, common, react, hooks, utils |

## Links

- npm: https://www.npmjs.com/package/@appello/common
- Repository: https://bitbucket.org/appello/frontend-core
- npm.io page: https://npm.io/package/@appello/common

## Dependencies (3)

- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [date-fns](https://npm.io/package/date-fns.md) ^4.1.0
- [dot-path-value](https://npm.io/package/dot-path-value.md) ^0.0.11

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 6.0.8 (latest) — 2026-09-11
- 3.4.5-alpha.2 (alpha) — 2025-11-21
- 1.0.40 (prev-version) — 2023-11-16
- 6.0.7 — 2026-08-13
- 6.0.6 — 2026-06-26
- 6.0.5 — 2026-06-05
- 6.0.4 — 2026-06-05
- 6.0.3 — 2026-05-20
- 6.0.2 — 2026-05-14
- 6.0.1 — 2026-05-12
- 6.0.0 — 2026-05-06
- 5.0.0 — 2026-05-06
- 4.3.1 — 2026-04-27
- 4.3.0 — 2026-04-27
- 4.2.9 — 2026-01-30
- … 135 more at https://npm.io/package/@appello/common/versions

## README

# 🧩 @appello/common

A collection of reusable TypeScript utilities, React hooks, helper types, and shared functions for building modern React and React Native applications.

Designed to be lightweight, tree-shakable, and framework-agnostic wherever possible.

---

## 📋 Table of Contents

- [✨ Features](#features)
- [📦 Installation](#installation)
- [🚀 Quick Start](#quick-start)
- [🪝 Hooks](#hooks)
- [🛠️ Utilities](#utilities)
- [📝 Types](#types)
- [🤝 Development](#development)

---

## <a id="features"></a>✨ Features

- ⚛️ Reusable React hooks
- 🛠️ Utility functions for everyday development
- 📝 Shared TypeScript types
- 🎯 Fully typed API
- 🌳 Tree-shakable exports
- 📱 Compatible with React and React Native
- ♻️ Immutable helper functions
- 🚀 Zero runtime dependencies (except where required)

---

## <a id="installation"></a> 📦 Installation

```bash
npm install @appello/common
```

---

## <a id="quick-start"></a> 🚀 Quick Start

Import only what you need.

```ts
import { useInterval, useDebounce, isNil, deepMergeObjects } from '@appello/common';
```

Every utility is exported from the package root.

```ts
import { entries, keys, pick } from '@appello/common';
```

---

### 🪝 Hooks

The package includes reusable React hooks for state management, lifecycle helpers, timers, forms, and utility behavior.

| Category     | Hooks                                                                                                                      |
|--------------|----------------------------------------------------------------------------------------------------------------------------|
| ⏱️ Timing    | `useInterval`, `useCodeTimer`, `useDebounce`                                                                               |
| ⚛️ Lifecycle | `useMountEffect`, `useUnmountEffect`, `useUpdateEffect`, `useFirstMountState`, `useIsMounted`                              |
| 🧠 State     | `useDefault`, `useStateObject`, `useStep`, `useSwitchValue`, `usePrevious`, `useLatest`, `useManualUpdate`, `useListState` |
| 📝 Forms     | `useHookFormPersist`, `useSelectOptions`                                                                                   |
| 🔧 Utilities | `useCombinedRef`, `useMemoCallback`, `useQueryParamsBuilder`, `useIsClient`                                                |

Each hook has its own documentation inside the corresponding package folder.

---

## <a id="utilities"></a> 🛠️ Utilities

Utilities are grouped by purpose.

### 🔍 Type Guards

- `isArray`
- `isBlob`
- `isDate`
- `isEmpty`
- `isFile`
- `isFloat`
- `isFunction`
- `isInt`
- `isNil`
- `isNumber`
- `isObject`
- `isPrimitive`
- `isPromise`
- `isString`
- `isSymbol`

---

### 📦 Object Utilities

- `deepMergeObjects`
- `deepEqual`
- `entries`
- `keys`
- `omit`
- `pick`
- `deepKeys`
- `shake`

---

### 🧮 Array Utilities

- `difference`
- `intersection`
- `uniq`
- `compact`
- `mergeCollectionByKey`
- `group`
- `fork`
- `alphabetical`
- `chunk`
- `sequence`
- `replaceOrAppend`
- `filterMap`
- `keyBy`
- `countBy`

---

### 🌐 Browser & Environment

- `checkIsServer`
- `checkNavigator`

---

### 📁 File Utilities

- `formDataBuilder`
- `makeFormData`
- `mapFormData`
- `toBase64`
- `getFileExtension`
- `getFileName`

---

### 🔤 String Utilities

- `capitalize`
- `truncate`
- `pluralize`
- `enumKeyToReadable`

---

### 🔢 Number Utilities

- `formatCurrency`
- `formatNumber`
- `toFinite`

---

### 🔗 URL Utilities

- `makeQueryString`

---

### ⚙️ Miscellaneous

- `debounce`
- `throttle`
- `sleep`
- `noop`
- `getDirtyValues`
- `getProto`
- `getWeekdaysNames`
- `enumToSelectOptions`

---

### 📝 Types

The package exports commonly used utility types such as:

- `ElementType`
- `Nullable`
- `NotNullable`
- `Nillable`
- `NotNillable`
- `Unidentifiable`
- `Negative`
- `ValueOf`
- `AnyObject`
- `AnyPromise`
- `PartialRecord`
- `PartialDeep`
- `ResponseErrors`
- `UnknownFunction`
- `AnyFunction`
- `PromiseType`
- `RequiredKeys`
- `OptionalKeys`
- `Merge`
- `AsyncReturnType`
- `FirstArgument`

---

## <a id="development"></a> 🤝 Development

Every public module should be exported from the package root.

```ts
import { useInterval, deepMergeObjects, isNil } from '@appello/common';
```

When adding a new hook or utility:

- create a dedicated folder;
- export it through an `index.ts`;
- re-export it from the package root;
- include a README with usage examples.

This keeps the API consistent and enables tree-shaking.

---

- **Package Version:** [![npm version](https://img.shields.io/npm/v/@appello/common.svg?style=flat)](https://www.npmjs.com/package/@appello/common)
- **License:** ISC
- **Author:** Appello Software

For more examples and advanced usage, check the test files in the repository.

---
_Source: https://npm.io/package/@appello/common · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
