# @eggjs/extend2

> Port of jQuery.extend for Node.js

Latest version **5.1.0** (published 2026-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eggjs/extend2
pnpm add @eggjs/extend2
yarn add @eggjs/extend2
bun add @eggjs/extend2
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2026-10-07 |
| First published | 2025-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=22.18.0 |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | popomore |
| Maintainers | gxkl, eggjs-admin, fengmk2, atian25, hyj1991, killagu, coolme200, akitasummer, elrrrrrrr, niania |
| Keywords | clone, extend, merge |

## Links

- npm: https://www.npmjs.com/package/@eggjs/extend2
- Repository: https://github.com/eggjs/egg
- Homepage: https://github.com/eggjs/egg/tree/next/packages/extend2
- Issues: https://github.com/eggjs/egg/issues
- npm.io page: https://npm.io/package/@eggjs/extend2

## Recent versions

- 5.1.0 (latest) — 2026-10-07
- 5.0.2-rc.1 (rc) — 2026-10-06
- 5.0.2-beta.27 (beta) — 2026-09-20
- 5.0.2 — 2026-10-06
- 5.0.2-rc.0 — 2026-09-23
- 5.0.2-beta.26 — 2026-08-07
- 5.0.2-beta.25 — 2026-07-13
- 5.0.2-beta.24 — 2026-07-12
- 5.0.2-beta.23 — 2026-07-11
- 5.0.2-beta.22 — 2026-07-11
- 5.0.2-beta.20 — 2026-07-09
- 5.0.2-beta.19 — 2026-06-29
- 5.0.2-beta.17 — 2026-06-28
- 5.0.2-beta.16 — 2026-06-26
- 5.0.2-beta.15 — 2026-06-26
- … 54 more at https://npm.io/package/@eggjs/extend2/versions

## README

# @eggjs/extend2

Forked from [node-extend], the difference is overriding array as primitive when deep clone.

[![NPM version][npm-image]][npm-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/@eggjs/extend2.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@eggjs/extend2
[snyk-image]: https://snyk.io/test/npm/extend2/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/@eggjs/extend2
[download-image]: https://img.shields.io/npm/dm/@eggjs/extend2.svg?style=flat-square
[download-url]: https://npmjs.org/package/@eggjs/extend2

## Usage

```ts
import { extend } from '@eggjs/extend2';

// for deep clone
extend(true, {}, object1, objectN);
```

## License

`@eggjs/extend2` is licensed under the [MIT License](LICENSE).

## Acknowledgements

All credit to the jQuery authors for perfecting this amazing utility.

Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].

[github-justmoon]: https://github.com/justmoon
[github-insin]: https://github.com/insin
[github-ljharb]: https://github.com/ljharb
[node-extend]: https://github.com/justmoon/node-extend

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