@acodeninja/persist 3.0.0-next.6 → 3.0.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acodeninja/persist",
3
- "version": "3.0.0-next.6",
3
+ "version": "3.0.0-next.7",
4
4
  "description": "A JSON based data modelling and persistence module with alternate storage mechanisms.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -170,7 +170,10 @@ export default class StorageEngine {
170
170
  .map(([propertyName, propertyType]) => [
171
171
  registeredModelName,
172
172
  propertyName,
173
- typeof propertyType === 'function' && !Type.Model.isModel(propertyType) ? propertyType() : propertyType,
173
+ typeof propertyType === 'function' &&
174
+ !/^class/.test(Function.prototype.toString.call(propertyType)) &&
175
+ !Type.Model.isModel(propertyType) ?
176
+ propertyType() : propertyType,
174
177
  ])
175
178
  .filter(([_m, _p, type]) => Type.Model.isModel(type))
176
179
  .map(([containingModel, propertyName, propertyType]) => ({