- License
- MIT
- Deps
- 0
- Install Size
- 6.5 kB
- Vulns
- 0
- Published
$
npm install xtend$
pnpm add xtend$
yarn add xtend$
bun add xtend$
deno add npm:xtend$
vlt install xtend$
vp add xtendYou might not need this dependency.
This package can be replaced with Object.assign, or if deep clones are needed, use structuredClone, available since Node 4.0.0.Learn more
xtend
Extend like a boss
xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
Examples
var extend = require("xtend")
// extend returns a new object. Does not mutate arguments
var combination = extend({
a: "a",
b: "c"
}, {
b: "b"
})
// { a: "a", b: "b" }
