immutable-object-methods
Advanced tools
Comparing version 2.0.0 to 3.0.0
import { | ||
getIn, | ||
setIn, | ||
@@ -8,3 +7,2 @@ mergeDeep, | ||
without, | ||
chain, | ||
} from 'immutable-object-methods'; | ||
@@ -25,10 +23,2 @@ | ||
const value = getIn({ a: { b: 'c' } }, ['a', 'b']); | ||
// will print out 'c' | ||
console.log(value); | ||
const noneExists = getIn({}, ['a', 'b']); | ||
// don't throw if value doesn't exists, just return undefined | ||
console.log(noneExists === undefined); | ||
const data = set({ beep: 'boop' }, 'foo', 'bar'); | ||
@@ -40,6 +30,1 @@ console.log(data); | ||
// all of these can also be used chained, like | ||
const chained = chain({ foo: 'bar' }) | ||
.set('beep', 'boop') | ||
.without('foo').value; | ||
console.log(chained); |
{ | ||
"name": "immutable-object-methods", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.", | ||
@@ -8,3 +8,5 @@ "main": "lib/index.js", | ||
"test": "ava", | ||
"posttest": "package-json-to-readme package.json > readme.md" | ||
"posttest": "package-json-to-readme package.json > readme.md", | ||
"build": "rm -rf dist && tsc", | ||
"prepare": "yarn build" | ||
}, | ||
@@ -24,5 +26,17 @@ "repository": { | ||
"package-json-to-readme": "^2.1.1", | ||
"prettier": "^1.17.0" | ||
"prettier": "^1.17.0", | ||
"ts-node": "^8.1.0", | ||
"type-fest": "^0.4.1", | ||
"typescript": "^3.4.5" | ||
}, | ||
"dependencies": {} | ||
"dependencies": {}, | ||
"ava": { | ||
"compileEnhancements": false, | ||
"extensions": [ | ||
"ts" | ||
], | ||
"require": [ | ||
"ts-node/register/transpile-only" | ||
] | ||
} | ||
} |
@@ -22,3 +22,2 @@ # immutable-object-methods | ||
import { | ||
getIn, | ||
setIn, | ||
@@ -29,3 +28,2 @@ mergeDeep, | ||
without, | ||
chain, | ||
} from 'immutable-object-methods'; | ||
@@ -46,10 +44,2 @@ | ||
const value = getIn({ a: { b: 'c' } }, ['a', 'b']); | ||
// will print out 'c' | ||
console.log(value); | ||
const noneExists = getIn({}, ['a', 'b']); | ||
// don't throw if value doesn't exists, just return undefined | ||
console.log(noneExists === undefined); | ||
const data = set({ beep: 'boop' }, 'foo', 'bar'); | ||
@@ -61,7 +51,2 @@ console.log(data); | ||
// all of these can also be used chained, like | ||
const chained = chain({ foo: 'bar' }) | ||
.set('beep', 'boop') | ||
.without('foo').value; | ||
console.log(chained); | ||
@@ -86,2 +71,5 @@ ``` | ||
- [prettier](https://ghub.io/prettier): Prettier is an opinionated code formatter | ||
- [ts-node](https://ghub.io/ts-node): TypeScript execution environment and REPL for node.js, with source map support | ||
- [type-fest](https://ghub.io/type-fest): A collection of essential TypeScript types | ||
- [typescript](https://ghub.io/typescript): TypeScript is a language for application scale JavaScript development | ||
@@ -88,0 +76,0 @@ ## License |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36
671
29728
6
74