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

mobx-rest

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-rest - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

5

lib/Model.js

@@ -105,2 +105,3 @@ 'use strict';

var originalAttributes = this.attributes.toJS();
if (!this.get('id')) {

@@ -113,3 +114,5 @@ return this.collection.create(attributes, { optimistic: optimistic });

if (patch) {
data = Object.assign({}, this.attributes.toJS(), attributes);
data = Object.assign({}, originalAttributes, attributes);
} else {
data = attributes;
}

@@ -116,0 +119,0 @@

2

package.json
{
"name": "mobx-rest",
"version": "0.0.9",
"version": "0.0.10",
"description": "REST conventions for mobx.",

@@ -5,0 +5,0 @@ "repository": {

@@ -74,3 +74,3 @@ /*global describe, it, context, beforeEach*/

it('it sets model straight away', () => {
model.save({id: item.id, name}, {patch: false})
model.save({name}, {patch: false})
assert.equal(model.get('name'), 'dylan')

@@ -77,0 +77,0 @@ assert.equal(model.get('album'), null)

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