apical-store
Advanced tools
Comparing version 0.0.79 to 0.0.80
@@ -98,17 +98,2 @@ (function (global, factory) { | ||
} | ||
function isTrueObj(obj) { | ||
// Check if it's an object | ||
if (typeof obj !== "object" || obj === null) { | ||
return false; | ||
} | ||
// check if it is a data | ||
if (obj.constructor === Date) { | ||
return false; | ||
} | ||
if (Array.isArray(obj)) { | ||
return false; | ||
} | ||
// Check if the prototype's constructor is the same as the object's constructor | ||
return Object.getPrototypeOf(obj).constructor === obj.constructor; | ||
} | ||
@@ -147,2 +132,4 @@ /** | ||
} | ||
// also copy methods, getters and setters | ||
copyPropertiesTo(source, target); | ||
return target; | ||
@@ -665,9 +652,2 @@ }, | ||
}); | ||
/** | ||
* # if the observable is an object, we need to copy its methods and getters as well | ||
* as I commonly use those for state management | ||
*/ | ||
if (isTrueObj(argument) && !Observable.isObservable(argument)) { | ||
copyPropertiesTo(argument, this.target); | ||
} | ||
} | ||
@@ -674,0 +654,0 @@ /** |
@@ -28,9 +28,2 @@ import * as utils from "./utils"; | ||
}); | ||
/** | ||
* # if the observable is an object, we need to copy its methods and getters as well | ||
* as I commonly use those for state management | ||
*/ | ||
if (utils.isTrueObj(argument) && !Observable.isObservable(argument)) { | ||
utils.copyPropertiesTo(argument, this.target); | ||
} | ||
} | ||
@@ -37,0 +30,0 @@ /** |
import { oMetaKey } from "./const"; | ||
import { ObservableArrayMeta, ObservableObjectMeta } from "./meta"; | ||
import * as utils from "./utils"; | ||
export const prepare = { | ||
@@ -10,2 +11,4 @@ object(source, oMeta, visited) { | ||
} | ||
// also copy methods, getters and setters | ||
utils.copyPropertiesTo(source, target); | ||
return target; | ||
@@ -12,0 +15,0 @@ }, |
{ | ||
"name": "apical-store", | ||
"version": "0.0.79", | ||
"description": "Mobx-Syncable-IndexedDB", | ||
"version": "0.0.80", | ||
"description": "reactive-syncable-datastore", | ||
"main": "dist/bundle.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/main.js", |
@@ -38,10 +38,2 @@ import * as utils from "./utils"; | ||
}); | ||
/** | ||
* # if the observable is an object, we need to copy its methods and getters as well | ||
* as I commonly use those for state management | ||
*/ | ||
if (utils.isTrueObj(argument) && !Observable.isObservable(argument)) { | ||
utils.copyPropertiesTo(argument, this.target); | ||
} | ||
} | ||
@@ -48,0 +40,0 @@ |
import { oMetaKey } from "./const"; | ||
import { ObservableArrayMeta, ObservableMeta, ObservableObjectMeta } from "./meta"; | ||
import { observed } from "./types"; | ||
import * as utils from "./utils"; | ||
@@ -16,2 +17,4 @@ export const prepare = { | ||
} | ||
// also copy methods, getters and setters | ||
utils.copyPropertiesTo(source, target); | ||
return target; | ||
@@ -18,0 +21,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
254936
6897