immutable-object-methods
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -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({}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6321
120