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

simple-update-in

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-update-in - npm Package Compare versions

Comparing version 1.1.2-master.6d997fd to 1.1.2-master.9dfd73c

7

CHANGELOG.md

@@ -10,8 +10,9 @@ # Changelog

- If after `updater` result in nothing change (triple-equal `===`), will return untouched
- `updater` returned `undefined` will
- `updater` returned `undefined` will be treated as removing the item
### Fixed
- Updating `[1, 2]` with `[-1, 0]` set to `'Hello'` should return `[1, 2, ['Hello']]` instead of `[1, 2, 'Hello']`
- Append not creating sub-structure correctly
- `updateIn([1, 2], [-1, 0], 'Hello')` should return `[1, 2, ['Hello']]` instead of `[1, 2, 'Hello']`
## [1.1.1]
## [1.1.1] - 2018-04-06
### Fixed

@@ -18,0 +19,0 @@ - Move `babel` and `gulp` into `devDependencies`

{
"name": "simple-update-in",
"version": "1.1.2-master.6d997fd",
"version": "1.1.2-master.9dfd73c",
"description": "",

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

@@ -19,10 +19,12 @@ # simple-update-in

For example, `obj.one.two = 1.2`, call `updateIn(obj, ['one', 'two'], 1.2)`. It will return a new object with changes in deep clone.
We share similar signature as [ImmutableJS.updateIn](https://facebook.github.io/immutable-js/docs/#/Map/updateIn):
```js
updateIn(
target: Array|Map,
updateIn<T: Array|Map>(
target: T,
path: (Number|String)[],
updater?: (value: any) => any
)
): T
```

@@ -29,0 +31,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