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.4.0 to 0.4.1

dist/simple.test.d.ts

21

dist/modeled-mobx.js

@@ -210,9 +210,4 @@ var mobx = require('mobx');

if (!properties) {
if (!properties && !decoratedSchema || properties && properties.decorateOnly) {
mobx.makeObservable(model);
if (!decoratedSchema) {
return; // no decorators have created schema
}
return;

@@ -223,7 +218,11 @@ }

const mobxAnnotations = {};
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
if (properties) {
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
}
schema.properties.forEach((options, key) => {

@@ -230,0 +229,0 @@ if (!options.annotated) {

@@ -210,9 +210,4 @@ import { observable, intercept, isObservableArray, makeObservable } from 'mobx';

if (!properties) {
if (!properties && !decoratedSchema || properties && properties.decorateOnly) {
makeObservable(model);
if (!decoratedSchema) {
return; // no decorators have created schema
}
return;

@@ -223,7 +218,11 @@ }

const mobxAnnotations = {};
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
if (properties) {
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
}
schema.properties.forEach((options, key) => {

@@ -230,0 +229,0 @@ if (!options.annotated) {

@@ -210,9 +210,4 @@ import { observable, intercept, isObservableArray, makeObservable } from 'mobx';

if (!properties) {
if (!properties && !decoratedSchema || properties && properties.decorateOnly) {
makeObservable(model);
if (!decoratedSchema) {
return; // no decorators have created schema
}
return;

@@ -223,7 +218,11 @@ }

const mobxAnnotations = {};
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
if (properties) {
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
}
schema.properties.forEach((options, key) => {

@@ -230,0 +229,0 @@ if (!options.annotated) {

@@ -213,9 +213,4 @@ (function (global, factory) {

if (!properties) {
if (!properties && !decoratedSchema || properties && properties.decorateOnly) {
mobx.makeObservable(model);
if (!decoratedSchema) {
return; // no decorators have created schema
}
return;

@@ -226,7 +221,11 @@ }

const mobxAnnotations = {};
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
if (properties) {
Object.keys(properties).forEach(property => {
if (!schema.recordProperty(property, properties[property])) {
mobxAnnotations[property] = properties[property];
}
});
}
schema.properties.forEach((options, key) => {

@@ -233,0 +232,0 @@ if (!options.annotated) {

@@ -6,3 +6,7 @@ import { CreateObservableOptions } from "mobx";

};
declare type DecorateOnly = {
decorateOnly: true;
};
export declare function modelize(model: ModelInstance, properties: DecorateOnly): void;
export declare function modelize(model: ModelInstance, properties?: ModelizeProperties<ModelInstance>, options?: CreateObservableOptions): void;
export {};
{
"name": "modeled-mobx",
"version": "0.4.0",
"version": "0.4.1",
"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