Socket
Socket
Sign inDemoInstall

immutable-object-methods

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-object-methods - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

dist/index.js

@@ -46,2 +46,4 @@ 'use strict';

return changesInput(input, keys, value) ? _setIn(input, keys, value) : input;
};
};
exports.default = { setIn: setIn };

@@ -23,1 +23,3 @@ import assign from 'object-assign';

changesInput(input, keys, value) ? _setIn(input, keys, value) : input;
export default {setIn};
{
"name": "immutable-object-methods",
"version": "1.0.2",
"version": "1.0.3",
"description": "Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.",

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

@@ -19,3 +19,3 @@ # immutable-object-methods

const input = {a: {b: 'c'}};
const updated = setIn(input, ['a', 'd'], e);
const updated = setIn(input, ['a', 'd'], 'e');

@@ -22,0 +22,0 @@ console.log(input);

import test from 'ava';
import 'babel-core/register';
import {setIn} from './lib';
import objectMethods from './lib';
test('default export', t => {
t.is(objectMethods.setIn, setIn);
});
test('setIn', t => {

@@ -6,0 +11,0 @@ const input = Object.freeze({});

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