Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

styfle/xtend-es6

Repository files navigation

xtend-es6

Build Status locked Extend like a modern boss using Object.assign()

xtend-es6 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.

It's a drop-in replacement for xtend that is slightly smaller.

In fact, just copy the source and then you won't need this dependency! Really, this is a native JavaScript feature now!

Examples

const extend = require("xtend-es6")

// extend returns a new object. Does not mutate arguments
const combination = extend({
    a: "a",
    b: "c"
}, {
    b: "b"
})
// { a: "a", b: "b" }

Support

Works anywhere Object.assign() works

About

extend like a modern boss with Object.assign()

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published