vuex-orm-decorators
Advanced tools
Comparing version 2.0.0-beta.4 to 2.0.0-beta.5
@@ -19,8 +19,14 @@ import { Type } from '@vuex-orm/core'; | ||
} | ||
if (value === undefined && typeof this.value !== 'number') { | ||
return this.value || new Date(); | ||
if (typeof value === 'number') { | ||
this.value = value; | ||
} | ||
if (this.isMilliseconds(value)) { | ||
this.value = parseInt(value); | ||
} | ||
return new Date(this.value); | ||
} | ||
isMilliseconds(value) { | ||
return parseInt(value).toString().length > 12; | ||
} | ||
} | ||
//# sourceMappingURL=DateType.js.map |
{ | ||
"name": "vuex-orm-decorators", | ||
"version": "2.0.0-beta.4", | ||
"version": "2.0.0-beta.5", | ||
"description": "Simple Typescript decorators to improve the vuex-orm experience in Typescript by introducing typed property access.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
34194
324