# @jsopen/objects

> Helper utilities for working with JavaScript objects and arrays

Latest version **2.3.4** (published 2026-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jsopen/objects
pnpm add @jsopen/objects
yarn add @jsopen/objects
bun add @jsopen/objects
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.3.4 |
| Published | 2026-09-28 |
| First published | 2024-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >= 16.0 |
| Dependencies | 1 |
| Unpacked size | 44 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Panates |
| Maintainers | erayhanoglu, ilkergurelli |
| Keywords | object, util, utils, merge, clone, deep, omit, is-plain, object-utils |

## Links

- npm: https://www.npmjs.com/package/@jsopen/objects
- Repository: https://github.com/panates/jsopen-objects
- Homepage: https://github.com/panates/jsopen-objects#readme
- Issues: https://github.com/panates/jsopen-objects/issues
- npm.io page: https://npm.io/package/@jsopen/objects

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.8.1

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.3.4 (latest) — 2026-09-28
- 2.3.3 — 2026-09-13
- 2.3.1 — 2026-09-08
- 2.3.0 — 2026-08-19
- 2.2.3 — 2026-06-29
- 2.2.2 — 2026-05-15
- 2.2.1 — 2026-04-11
- 2.2.0 — 2026-03-06
- 2.1.1 — 2026-02-10
- 2.1.0 — 2026-02-04
- 2.0.2 — 2025-08-15
- 2.0.1 — 2025-08-14
- 2.0.0 — 2025-08-14
- 1.6.3 — 2025-06-24
- 1.6.2 — 2025-05-26
- … 12 more at https://npm.io/package/@jsopen/objects/versions

## README

# @jsopen/objects

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![CI Tests][ci-test-image]][ci-test-url]
[![Test Coverage][coveralls-image]][coveralls-url]

A 'swiss army knife' solution for working with JavaScript objects and arrays — deep merging,
cloning, omitting keys/nullish values, and a set of dependency-free type guards, all in one
small, fully-typed package.

## Features

- **`merge`** — deep or shallow merging of objects/arrays, multiple sources, array merge
  strategies (append/unique), property-descriptor cloning, custom filters, and built-in
  prototype-pollution protection.
- **`clone` / `deepClone`** — copy objects and arrays (including class instances with
  `deepClone`), with full support for top-level arrays as the value being cloned.
- **`omit` / `omitUndefined` / `omitNull` / `omitNullish`** — drop specific keys or
  `null`/`undefined` values, shallow or deep, from objects or arrays.
- **Type guards** — `isObject`, `isPlainObject`, `isBuiltIn`, `isConstructor`, `isIterable`,
  `isAsyncIterable` — none of them throw on unexpected input.
- **`updateErrorMessage`** — change an `Error`'s message and keep its stack trace header
  consistent, without losing the original stack frames.
- Zero runtime dependencies, ESM-only, written in TypeScript.

## Quick Start

```typescript
import { merge, clone, deepClone, omit, omitUndefined } from '@jsopen/objects';

// Deep merge
merge({ a: 1 }, { b: 2 }, { deep: true });
// => { a: 1, b: 2 }

// Clone (objects or top-level arrays, deeply by default)
clone({ a: 1, b: { c: 2 } });
clone([1, 2, { x: 1 }]);

// Deep-clone including class instances
class Point { constructor(public x: number, public y: number) {} }
deepClone({ point: new Point(1, 2) });

// Exclude keys / nullish values
omit({ a: 1, b: 2, c: 3 }, ['b']);          // => { a: 1, c: 3 }
omitUndefined({ a: 1, b: undefined }, true); // => { a: 1 }
```

## Documentation

See the [**Full API Reference**](docs/api.md) for every function, option, and edge case, or
jump to a focused guide:

### [merge](docs/merge.md)
A powerful, flexible tool for merging objects, arrays, and their nested properties.

### [clone / deepClone](docs/clone.md)
Easy ways to create shallow or deep copies of objects and arrays.

### [omit / omitUndefined / omitNull / omitNullish](docs/omit.md)
Easily exclude specific keys or nullish values from objects.

### [updateErrorMessage](docs/update-error-message.md)
Update an Error object's message while correctly refreshing the stack trace.

### [Utilities](docs/utils.md)
Various utility functions for object and type checking.


## Installation

`$ npm install @jsopen/objects`

## Node Compatibility

- node `>= 16`;

### License
[MIT](LICENSE)


[npm-image]: https://img.shields.io/npm/v/@jsopen/objects
[npm-url]: https://npmjs.org/package/@jsopen/objects
[ci-test-image]: https://github.com/panates/jsopen-objects/actions/workflows/test.yml/badge.svg
[ci-test-url]: https://github.com/panates/jsopen-objects/actions/workflows/test.yml
[coveralls-image]: https://coveralls.io/repos/github/panates/jsopen-objects/badge.svg?branch=main
[coveralls-url]: https://coveralls.io/github/panates/jsopen-objects?branch=main
[downloads-image]: https://img.shields.io/npm/dm/@jsopen/objects.svg
[downloads-url]: https://npmjs.org/package/@jsopen/objects

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