Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extendable-immutable

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extendable-immutable - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

27

es/extendable.js

@@ -25,24 +25,13 @@ import createExtendable from './util/createExtendable';

function copy(val, update) {
for (var _iterator = KEYS, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
val[key] = update[key];
}
return val;
return KEYS.reduce(function (acc, key) {
acc[key] = update[key];
return acc;
}, val);
}
function empty(val) {
return Object.assign(val, EMPTY);
return Object.keys(EMPTY).reduce(function (acc, key) {
acc[key] = EMPTY[key];
return acc;
}, val);
}

@@ -49,0 +38,0 @@

@@ -36,24 +36,13 @@ 'use strict';

function copy(val, update) {
for (var _iterator = KEYS, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var key = _ref;
val[key] = update[key];
}
return val;
return KEYS.reduce(function (acc, key) {
acc[key] = update[key];
return acc;
}, val);
}
function empty(val) {
return Object.assign(val, EMPTY);
return Object.keys(EMPTY).reduce(function (acc, key) {
acc[key] = EMPTY[key];
return acc;
}, val);
}

@@ -60,0 +49,0 @@

{
"name": "extendable-immutable",
"version": "1.3.1",
"version": "1.3.2",
"main": "lib/index.js",

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

@@ -25,11 +25,15 @@ import createExtendable from './util/createExtendable'

function copy(val, update) {
for (const key of KEYS) {
val[key] = update[key]
}
return val
return KEYS.reduce((acc, key) => {
acc[key] = update[key]
return acc
}, val)
}
function empty(val) {
return Object.assign(val, EMPTY)
return Object
.keys(EMPTY)
.reduce((acc, key) => {
acc[key] = EMPTY[key]
return acc
}, val)
}

@@ -36,0 +40,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc