Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

extendr

bevry148.1kArtistic-2.07.10.0

Utilities for cloning, extending, and de-referencing objects in shallow, deep, and safe ways

browser, clone, deepClone, deepExtend, dereference, es5, esnext, extend, node, safeExtend, shallowExtend, typed, types

readme

extendr

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

Utilities for cloning, extending, and de-referencing objects in shallow, deep, and safe ways

Usage

Complete API Documentation.

Install

npm

  • Install: npm install --save extendr
  • Import: import * as pkg from ('extendr')
  • Require: const pkg = require('extendr')

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/extendr@7.10.0'
</script>

Editions

This package is published with the following editions:

  • extendr aliases extendr/index.cjs which uses the Editions Autoloader to automatically select the correct edition for the consumer's environment
  • extendr/source/index.js is ESNext source code for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules
  • extendr/edition-browsers/index.js is ESNext compiled for web browsers with Require for modules
  • extendr/edition-node-4/index.js is ESNext compiled for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules

TypeScript

This project provides its type information via inline JSDoc Comments. To make use of this in TypeScript, set your maxNodeModuleJsDepth compiler option to 5 or thereabouts. You can accomplish this via your tsconfig.json file like so:

{
  "compilerOptions": {
    "maxNodeModuleJsDepth": 5
  }
}

History

Discover the release history by heading on over to the HISTORY.md file.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Patreon donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

  • Andrew Nesbitt — Software engineer and researcher
  • Balsa — We're Balsa, and we're building tools for builders.
  • Codecov — Empower developers with tools to improve code quality and testing.
  • Poonacha Medappa
  • Rob Morris
  • Sentry — Real-time crash reporting for your web apps, mobile apps, and games.
  • Syntax — Syntax Podcast

Donors

License

Unless stated otherwise all works are:

and licensed under:

changelog

History

v7.10.0 2024 January 2

v7.9.0 2023 December 29

v7.8.0 2023 December 27

v7.7.0 2023 December 6

v7.6.0 2023 December 5

v7.5.1 2023 December 5

  • Fix bad prettier configuration that caused Node.js v6 to fail

v7.5.0 2023 December 5

v7.4.0 2023 November 24

v7.3.0 2023 November 21

v7.2.0 2023 November 14

v7.1.0 2023 November 13

v7.0.0 2023 November 13

  • Updated dependencies, base files, and editions using boundation
  • Minimum required Node.js version changed from node: >=8 to node: >=4 adapting to ecosystem changes

v6.0.0 2023 November 13

  • Updated dependencies, base files, and editions using boundation
  • Minimum required Node.js version changed from node: >=10 to node: >=8 adapting to ecosystem changes

v5.20.0 2023 November 1

v5.19.0 2021 July 30

v5.18.0 2021 July 29

v5.17.0 2021 July 28

v5.16.0 2020 October 29

v5.15.0 2020 September 4

v5.14.0 2020 August 18

v5.13.0 2020 August 4

v5.12.0 2020 July 22

v5.11.0 2020 July 22

v5.10.0 2020 June 25

v5.9.0 2020 June 21

v5.8.0 2020 June 21

v5.7.0 2020 June 20

v5.6.0 2020 June 10

v5.5.0 2020 June 10

v5.4.0 2020 May 22

v5.3.0 2020 May 21

v5.2.0 2020 May 13

v5.1.0 2020 May 4

v5.0.0 2020 March 26

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=8 to node: >=10 to keep up with mandatory ecosystem changes

v4.3.0 2019 December 9

v4.2.0 2019 December 1

v4.1.0 2019 December 1

v4.0.0 2019 November 18

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=0.12 to node: >=8 to keep up with mandatory ecosystem changes

v3.6.0 2019 November 13

v3.5.0 2019 November 8

v3.4.1 2018 December 8

v3.4.0 2018 December 8

v3.3.1 2018 January 26

  • Only support dereference on RegExp, on environments that support it

v3.3.0 2018 January 26

  • Added dereference as an alternative for dereferenceJSON
  • Updated base files

v3.2.2 2016 June 19

  • Re-added node 0.10 compatibility (regression since v3.0.0)
    • Albeit implicit/untested compat as dev deps require node >=0.12

v3.2.1 2016 June 16

  • Re-added missing engines property (regression since v3.2.0)
  • Removed unused editions syntax

v3.2.0 2016 May 27

  • UNPUBLISHED: due to missing engines field, replacement is v3.2.1
  • Updated internal conventions

v3.1.0 2015 December 9

  • Updated internal conventions

v3.0.1 2015 September 21

  • Updated dependencies

v3.0.0 2015 September 11

  • Moved from CoffeeScript to ES6+
  • Rewrote to ensure reference consistency
    • clone has been "removed", as deepClone is now clone, as a shallow clone doesn't make sense
    • deepExtend is now deep
    • shallowExtendPlainObjects is now extend
    • safeShallowExtendPlainObjects is now defaults
    • deepExtendPlainObjects is now deep
    • safeDeepExtendPlainObjects is now deepDefaults
    • dereference is now dereferenceJSON

v2.1.0 2013 June 29

  • Arrays now correctly deep extend

v2.0.1 2013 March 28

  • Added deepExtend alias for deepExtendPlainObjects

v2.0.0 2013 March 28