Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

gorillatron-extend

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gorillatron-extend

Merge properties from a list of objects into one new object.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

extend

Merge properties from two objects into one new object.

Installation

$ component install gorillatron/extend

API

extend( deep, objects... )

Like jquery extend, but doesnt mutate passed objects, only returns a fresh object with the extended properties.


var defaults = {
  hide: false,
  delay: 1500,
  css: {
    color: 'blue'
  }
}

var settings = extend(true, defaults,{
  delay: 1700,
  css: {
    border: '1px solid red'
  }
})

expect(settings).to.eql({
  hide: false,
  delay: 1700,
  css: {
    color: 'blue',
    border: '1px solid red'
  }
})

License

MIT

FAQs

Package last updated on 07 Nov 2012

Did you know?

Socket

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