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

rkatic-update

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rkatic-update - npm Package Compare versions

Comparing version 1.0.0 to 1.0.3

11

package.json
{
"name": "rkatic-update",
"version": "1.0.0",
"version": "1.0.3",
"description": "Utility for immutable deep updates of objects.",

@@ -10,7 +10,6 @@ "main": "lib",

"build": "npm run test && babel src -d lib",
"preversion": "npm run build",
"postversion": "git push && git push --tags"
"preversion": "npm run build"
},
"engines": {
"node": "8"
"node": ">=7"
},

@@ -31,5 +30,5 @@ "repository": {

],
"author": "Robert Katić",
"author": "Blazing Edge",
"license": "MIT",
"homepage": "https://github.com/rkatic/update#readme",
"homepage": "https://blog.blazingedge.io",
"devDependencies": {

@@ -36,0 +35,0 @@ "babel-cli": "^6.26.0",

@@ -1,41 +0,1 @@

[![Build Status](https://travis-ci.org/blazing-edge-labs/update.svg?branch=master)](https://travis-ci.org/blazing-edge-labs/update)
# update
Yet another utility for immutable object updates.
## Installation
`npm install rkatic-update --save`
## Usage
```js
const newState = update(state, 'path.to.users[7].balance', {
email: 'some.email@example.com',
balance: {
amount: n => n + 100
}
})
```
More examples in the [article](https://blog.blazingedge.io/immutable-update/).
## API
### `update(data, [path], change)`
#### Arguments
* **data *(any)***: The data to update.
* **[path] *(Array | string)***: The path of the property to update.
* **change *(any)***: The change to apply.
#### Returns
Updated data. When no effective changes are made, returns the same `data`.
### `REMOVE`
Special value to use in a **change** to remove part(s) of **data**.
# Moved to [@blazingedge/update](https://www.npmjs.com/package/@blazingedge/update)
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