# @cropper/utils

> A series of common constants and utility functions for Cropper.

Latest version **2.2.0** (published 2026-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cropper/utils
pnpm add @cropper/utils
yarn add @cropper/utils
bun add @cropper/utils
```

## Health

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

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2026-08-23 |
| First published | 2022-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 84 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13897 |
| Author | Chen Fengyuan |
| Maintainers | chenfengyuan |
| Keywords | utils, utilities, constants, functions, cropper, cropper.js |

## Links

- npm: https://www.npmjs.com/package/@cropper/utils
- Repository: https://github.com/fengyuanchen/cropperjs
- Homepage: https://github.com/fengyuanchen/cropperjs/tree/main/packages/utils/#readme
- Issues: https://github.com/fengyuanchen/cropperjs/issues
- npm.io page: https://npm.io/package/@cropper/utils

## Recent versions

- 2.2.0 (latest) — 2026-08-23
- 2.0.0-rc.2 (next) — 2024-08-18
- 2.1.1 — 2026-04-06
- 2.1.0 — 2025-10-19
- 2.0.1 — 2025-07-25
- 2.0.0 — 2025-03-01
- 2.0.0-rc.1 — 2024-07-06
- 2.0.0-rc.0 — 2024-06-22
- 2.0.0-rc — 2024-05-26
- 2.0.0-beta.5 — 2024-04-21
- 2.0.0-beta.4 — 2023-08-20
- 2.0.0-beta.3 — 2023-06-18
- 2.0.0-beta.2 — 2022-12-04
- 2.0.0-beta.1 — 2022-06-19
- 2.0.0-beta — 2022-05-01

## README

# @cropper/utils

> A series of common constants and utility functions for Cropper.

## Main npm package files

```text
dist/
├── utils.js         (UMD, bundled, default)
├── utils.min.js     (UMD, bundled, compressed)
├── utils.raw.js     (UMD, unbundled, default)
├── utils.esm.js     (ECMAScript Module, bundled)
├── utils.esm.min.js (ECMAScript Module, bundled, compressed)
├── utils.esm.raw.js (ECMAScript Module, unbundled)
└── utils.d.ts       (TypeScript Declaration File)
```

## Getting started

### Installation

```sh
npm install @cropper/utils
```

### Usage

```js
import { NAMESPACE, isObject } from '@cropper/utils';

console.log(NAMESPACE);
// > "cropper"

console.log(isObject({}));
// > true

console.log(isObject(null));
// > false
```

## Versioning

Maintained under the [Semantic Versioning guidelines](https://semver.org/).

## License

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

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