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

@insertish/mutable

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@insertish/mutable - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

1

dist/index.d.ts

@@ -20,2 +20,3 @@ import { Collection } from '@insertish/zangodb';

set(state: T): void;
setOverride(state: T): void;
patch(id: string, state: Partial<T>): void;

@@ -22,0 +23,0 @@ delete(_id: string): void;

@@ -71,2 +71,17 @@ "use strict";

}
setOverride(state) {
var _a;
let existing = this.getMutable(state._id);
if (existing) {
this.map[state._id] = new Proxy(state, this.proxyHandler);
this.emit('update', state._id);
(_a = this.collection) === null || _a === void 0 ? void 0 : _a.update({ _id: state._id }, {
$unset: Object.keys(existing).filter(x => x !== '_id'),
$set: Object.assign({}, state)
});
}
else {
this.create(state);
}
}
patch(id, state) {

@@ -73,0 +88,0 @@ let item = this.map[id];

4

package.json
{
"name": "@insertish/mutable",
"version": "1.0.4",
"version": "1.0.5",
"description": "Mutable object utilities.",

@@ -28,3 +28,3 @@ "main": "dist/index.js",

"dependencies": {
"@insertish/zangodb": "1.0.11",
"@insertish/zangodb": "^1.0.12",
"eventemitter3": "^4.0.7",

@@ -31,0 +31,0 @@ "lodash.isequal": "^4.5.0"

@@ -0,1 +1,3 @@

![npm](https://img.shields.io/npm/v/@insertish/mutable?style=flat-square)
### Why?

@@ -18,3 +20,3 @@

```typescript
import { MutableMap } from 'mutable.js';
import { MutableMap } from '@insertish/mutable';

@@ -21,0 +23,0 @@ type User = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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