Socket
Socket
Sign inDemoInstall

xtend

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xtend

extend like a boss


Version published
Weekly downloads
23M
decreased by-18.15%
Maintainers
1
Install size
7.09 kB
Created
Weekly downloads
 

Package description

What is xtend?

The xtend npm package is a utility for shallowly copying all properties from one or more source objects to a new object. It is useful for extending objects without modifying the original object, making it ideal for configurations, options, and default settings manipulation.

What are xtend's main functionalities?

Extending an object

This feature allows you to combine properties from one or more source objects into a new object. The properties from the source objects are copied into the new object, with later sources' properties overwriting earlier ones.

var extend = require('xtend');
var object = extend({key1: 'value1'}, {key2: 'value2'});
console.log(object);

Other packages similar to xtend

Readme

Source

xtend

browser support

locked

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" }

Stability status: Locked

MIT Licensed

Keywords

FAQs

Last updated on 08 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc