New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

object-path-immutable

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-path-immutable - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "object-path-immutable",
"version": "1.0.0",
"version": "1.0.1",
"description": "Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.",

@@ -5,0 +5,0 @@ "author": "Mario Casciaro <mariocasciaro@gmail.com>",

@@ -16,6 +16,13 @@ [![build](https://img.shields.io/travis/mariocasciaro/object-path-immutable.svg?style=flat-square)](https://travis-ci.org/mariocasciaro/object-path-immutable)

## Changelog
### 1.0
- **Breaking change**: The way the library handles empty paths has changed. Before this change,all the methods were returning the original object. The new behavior is as follows:
-
- **Breaking change**: The way the library handles empty paths has changed. Before this change,all the methods were returning the original object. The new behavior is as follows.
- `set(src, path, value)`: `value` is returned
- `update(src, path, updater)`: `value` will be passed to `updater()` and the result returned
- `set(src, path, ...values)`: `values` will be concatenated to `src` if `src` is an array, otherwise `values` will be returned
- `insert(src, path, value, at)`: if `src` is an array then it will be cloned and `value` will be inserted at `at`, otherwise `[value]` will be returned
- `del(src, path)`: returns `undefined`
- `assign(src, path, target)`: Target is assigned to a clone of `src` and returned
## Install

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