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

modeled-mobx

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modeled-mobx - npm Package Compare versions

Comparing version 0.0.2-0 to 0.0.3-0

16

dist/modeled-mobx.js

@@ -32,8 +32,18 @@ var mobx = require('mobx');

const m = new model();
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
if (typeof m.hydrate == 'function') {
m.hydrate(attrs);
} else {
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
}
return m;
}
function serialize(model) {
if (typeof model['serialize'] == 'function') {
return model['serialize']();
}
const schema = getSchema(model.constructor);

@@ -40,0 +50,0 @@

@@ -32,8 +32,18 @@ import { observable, intercept, makeObservable } from 'mobx';

const m = new model();
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
if (typeof m.hydrate == 'function') {
m.hydrate(attrs);
} else {
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
}
return m;
}
function serialize(model) {
if (typeof model['serialize'] == 'function') {
return model['serialize']();
}
const schema = getSchema(model.constructor);

@@ -40,0 +50,0 @@

@@ -32,8 +32,18 @@ import { observable, intercept, makeObservable } from 'mobx';

const m = new model();
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
if (typeof m.hydrate == 'function') {
m.hydrate(attrs);
} else {
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
}
return m;
}
function serialize(model) {
if (typeof model['serialize'] == 'function') {
return model['serialize']();
}
const schema = getSchema(model.constructor);

@@ -40,0 +50,0 @@

@@ -35,8 +35,18 @@ (function (global, factory) {

const m = new model();
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
if (typeof m.hydrate == 'function') {
m.hydrate(attrs);
} else {
Object.keys(attrs).forEach(a => {
m[a] = attrs[a];
});
}
return m;
}
function serialize(model) {
if (typeof model['serialize'] == 'function') {
return model['serialize']();
}
const schema = getSchema(model.constructor);

@@ -43,0 +53,0 @@

2

package.json
{
"name": "modeled-mobx",
"version": "0.0.2-0",
"version": "0.0.3-0",
"description": "MobX powered classes with type-coercion and serialization/hydration",

@@ -5,0 +5,0 @@ "author": "nathanstitt",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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