New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.6.3 to 0.6.4

10

dist/modeled-mobx.js

@@ -88,2 +88,4 @@ var mobx = require('mobx');

function hydrateFromSchema(instance, prop, attrs, schema) {
if (!attrs) return;
if (!schema) {

@@ -135,5 +137,7 @@ instance[prop] = attrs[prop];

} else {
Object.keys(attrs).forEach(prop => {
hydrateFromSchema(instance, prop, attrs, schema);
});
const keys = Object.keys(attrs || {});
for (let i = 0; i < keys.length; i++) {
hydrateFromSchema(instance, keys[i], attrs, schema);
}
}

@@ -140,0 +144,0 @@

@@ -88,2 +88,4 @@ import { observable, action, isObservableProp, intercept, isObservableArray, makeObservable } from 'mobx';

function hydrateFromSchema(instance, prop, attrs, schema) {
if (!attrs) return;
if (!schema) {

@@ -135,5 +137,7 @@ instance[prop] = attrs[prop];

} else {
Object.keys(attrs).forEach(prop => {
hydrateFromSchema(instance, prop, attrs, schema);
});
const keys = Object.keys(attrs || {});
for (let i = 0; i < keys.length; i++) {
hydrateFromSchema(instance, keys[i], attrs, schema);
}
}

@@ -140,0 +144,0 @@

@@ -88,2 +88,4 @@ import { observable, action, isObservableProp, intercept, isObservableArray, makeObservable } from 'mobx';

function hydrateFromSchema(instance, prop, attrs, schema) {
if (!attrs) return;
if (!schema) {

@@ -135,5 +137,7 @@ instance[prop] = attrs[prop];

} else {
Object.keys(attrs).forEach(prop => {
hydrateFromSchema(instance, prop, attrs, schema);
});
const keys = Object.keys(attrs || {});
for (let i = 0; i < keys.length; i++) {
hydrateFromSchema(instance, keys[i], attrs, schema);
}
}

@@ -140,0 +144,0 @@

@@ -91,2 +91,4 @@ (function (global, factory) {

function hydrateFromSchema(instance, prop, attrs, schema) {
if (!attrs) return;
if (!schema) {

@@ -138,5 +140,7 @@ instance[prop] = attrs[prop];

} else {
Object.keys(attrs).forEach(prop => {
hydrateFromSchema(instance, prop, attrs, schema);
});
const keys = Object.keys(attrs || {});
for (let i = 0; i < keys.length; i++) {
hydrateFromSchema(instance, keys[i], attrs, schema);
}
}

@@ -143,0 +147,0 @@

import { JSON, Model, ModelInstance } from './types';
export declare const hydrateModel: <T extends Model>(model: T, attrs: any, parent?: any) => InstanceType<T>;
export declare const hydrateInstance: <T extends ModelInstance>(instance: T, attrs: any, parent?: any) => T;
export declare const hydrateModel: <T extends Model>(model: T, attrs?: Object | undefined, parent?: any) => InstanceType<T>;
export declare const hydrateInstance: <T extends ModelInstance>(instance: T, attrs?: Object | undefined, parent?: any) => T;
export declare function serialize<T extends object>(model: T): JSON;

@@ -11,3 +11,3 @@ import { AnnotationsMap } from 'mobx';

export interface ModelInstance extends InstanceType<Model> {
hydrate?(attrs: any): void;
hydrate?(attrs?: Object): void;
}

@@ -14,0 +14,0 @@ export interface ModelOption extends Function {

{
"name": "modeled-mobx",
"version": "0.6.3",
"version": "0.6.4",
"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