object-path-immutable
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -14,16 +14,11 @@ type Path = string | ReadonlyArray<number | string>; | ||
interface ObjectPathImmutable { | ||
wrap<T>(obj: T): WrappedObject<T> | ||
set<T = object>(src: T, path?: Path, value?: any): T | ||
push<T = object>(src: T, path?: Path, value?: any): T | ||
del<T = object>(src: T, path?: Path): T | ||
assign<T = object>(src: T, path?: Path, source?: T): T | ||
merge<T = object>(src: T, path?: Path, source?: any): T | ||
update<T = object>(src: T, path?: Path, updater?: (formerValue: any) => any): WrappedObject<T> | ||
insert<T = object>(src: T, path?: Path, value?: any, index?: number): T | ||
} | ||
declare module 'object-path-immutable' { | ||
const immutable: ObjectPathImmutable; | ||
export default immutable | ||
export function wrap<T>(obj: T): WrappedObject<T> | ||
export function set<T = object>(src: T, path?: Path, value?: any): T | ||
export function push<T = object>(src: T, path?: Path, value?: any): T | ||
export function del<T = object>(src: T, path?: Path): T | ||
export function assign<T = object>(src: T, path?: Path, source?: T): T | ||
export function merge<T = object>(src: T, path?: Path, source?: any): T | ||
export function update<T = object>(src: T, path?: Path, updater?: (formerValue: any) => any): WrappedObject<T> | ||
export function insert<T = object>(src: T, path?: Path, value?: any, index?: number): T | ||
} |
{ | ||
"name": "object-path-immutable", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.", | ||
@@ -5,0 +5,0 @@ "author": "Mario Casciaro <m@mario.fyi>", |
51161
1541