Socket
Socket
Sign inDemoInstall

immutable-object-methods

Package Overview
Dependencies
Maintainers
3
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 2.0.0 to 3.0.0

dist/index.d.ts

15

example.js
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);

22

package.json
{
"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

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