Socket
Socket
Sign inDemoInstall

just-extend

Package Overview
Dependencies
0
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.8 to 1.1.9

2

package.json
{
"name": "just-extend",
"version": "1.1.8",
"version": "1.1.9",
"description": "extend an object",

@@ -5,0 +5,0 @@ "main": "index.js",

## just-extend
Part of a [library]('../README.md') of zero-dependency npm modules that do just do one thing.
Part of a [library]('../../README.md') of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for the bloat conscious developer.
```js
var obj = {a: 3, b: 5};
import extend from 'just-extend';
let obj = {a: 3, b: 5};
extend(obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
obj; // {a: 4, b: 5, c: 8}
var obj = {a: 3, b: 5};
let obj = {a: 3, b: 5};
extend({}, obj, {a: 4, c: 8}); // {a: 4, b: 5, c: 8}
obj; // {a: 3, b: 5}
var arr = [1, 2, 3];
var obj = {a: 3, b: 5};
let arr = [1, 2, 3];
let obj = {a: 3, b: 5};
extend(obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}

@@ -21,4 +23,4 @@ arr.push[4];

var arr = [1, 2, 3];
var obj = {a: 3, b: 5};
let arr = [1, 2, 3];
let obj = {a: 3, b: 5};
extend(true, obj, {c: arr}); // {a: 3, b: 5, c: [1, 2, 3]}

@@ -25,0 +27,0 @@ arr.push[4];

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