Huge News!Announcing our $40M Series B led by Abstract Ventures.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 3.1.1 to 4.0.0

cjs/object-path-immutable.js

5

CHANGELOG.md
Changelog
===========
### 4.0
- **Breaking change**: the previous default export is now called `wrap()`
- **Possible breaking change**: `object-path-immutable` now uses ES modules which means if you are in an ESM environment you will have to use named exports.
### 3.0

@@ -5,0 +10,0 @@

4

object-path-immutable.d.ts

@@ -1,2 +0,2 @@

type Path = string | ReadonlyArray<string>;
type Path = string | ReadonlyArray<number | string>;

@@ -15,3 +15,3 @@ interface WrappedObject<T> {

interface ObjectPathImmutable {
<T>(obj: T): WrappedObject<T>
wrap<T>(obj: T): WrappedObject<T>
set<T = object>(src: T, path?: Path, value?: any): T

@@ -18,0 +18,0 @@ push<T = object>(src: T, path?: Path, value?: any): T

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

@@ -16,7 +16,9 @@ "author": "Mario Casciaro <m@mario.fyi>",

},
"main": "index.js",
"main": "cjs/object-path-immutable.js",
"module": "esm/object-path-immutable.js",
"sideEffects": false,
"scripts": {
"build": "rollup -c",
"pretest": "standard",
"test": "npm run build && mocha test.js",
"test": "npm run build && mocha test/test.js",
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls",

@@ -28,14 +30,14 @@ "coverage": "nyc npm test",

"dependencies": {
"is-plain-object": "3.0.0"
"is-plain-object": "^3.0.0"
},
"devDependencies": {
"chai": "^4.2.0",
"coveralls": "^3.0.4",
"coveralls": "^3.0.6",
"nyc": "^14.1.1",
"mocha": "^6.1.4",
"mocha": "^6.2.0",
"mocha-lcov-reporter": "^1.3.0",
"rollup": "^1.16.2",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-node-resolve": "^5.1.0",
"standard": "^12.0.1"
"rollup": "^1.21.4",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"standard": "^14.3.1"
},

@@ -65,5 +67,7 @@ "keywords": [

"ignore": [
"dist"
"umd",
"esm",
"cjs"
]
}
}
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import pkg from './package.json'
export default {
input: 'index.js',
export default [{
input: 'src/object-path-immutable.js',
plugins: [

@@ -12,5 +13,20 @@ commonjs(),

name: 'objectPathImmutable',
file: 'dist/object-path-immutable.js',
file: `umd/${pkg.name}.js`,
format: 'umd'
}]
}
}, {
input: 'src/object-path-immutable.js',
output: {
file: `cjs/${pkg.name}.js`,
format: 'cjs',
esModule: false
},
external: ['is-plain-object']
}, {
input: 'src/object-path-immutable.js',
output: {
file: `esm/${pkg.name}.js`,
format: 'esm'
},
external: ['is-plain-object']
}]
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