Socket
Socket
Sign inDemoInstall

vuex-orm-decorators

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuex-orm-decorators - npm Package Compare versions

Comparing version 2.0.0-beta.5 to 2.0.0-beta.6

23

dist/plugins/Date/DateType.js

@@ -17,16 +17,19 @@ import { Type } from '@vuex-orm/core';

if (typeof value === 'string') {
this.value = Date.parse(value);
if (this.inRange(value)) {
value = new Date(parseInt(value));
}
if (this.mutator) {
this.value = value;
}
else {
return Date.parse(value);
}
}
if (typeof value === 'number') {
this.value = value;
}
if (this.isMilliseconds(value)) {
this.value = parseInt(value);
}
return new Date(this.value);
return new Date(this.value || value);
}
isMilliseconds(value) {
return parseInt(value).toString().length > 12;
inRange(value) {
const length = parseInt(value).toString().length;
return length < 15 && length > 12;
}
}
//# sourceMappingURL=DateType.js.map
{
"name": "vuex-orm-decorators",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"description": "Simple Typescript decorators to improve the vuex-orm experience in Typescript by introducing typed property access.",

@@ -11,2 +11,3 @@ "main": "dist/index.js",

"lint": "eslint . --ext .ts",
"lint:report": "yarn lint --output-file eslint_report.json --format json",
"test": "jest",

@@ -40,3 +41,2 @@ "test:coverage": "jest --collect-coverage"

"eslint-plugin-sort-keys-fix": "^1.1",
"eslint-plugin-standard": "^5.0",
"eslint-plugin-unused-imports": "^1.0",

@@ -43,0 +43,0 @@ "jest": "^26.6",

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