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 1.1.3 to 1.1.4

1

dist/attributes.js

@@ -16,3 +16,2 @@ import { Model } from '@vuex-orm/core';

return function (target, propertyName) {
console.log(propertyName);
target.constructor._fields = target.constructor._fields || {};

@@ -19,0 +18,0 @@ target.constructor._fields[propertyName] = fieldType;

4

dist/database.js

@@ -6,7 +6,6 @@ import VuexORM from '@vuex-orm/core';

ORMDatabase.install = function () {
ORMDatabase._ormDatabase = new VuexORM.Database();
return VuexORM.install(ORMDatabase._ormDatabase);
};
ORMDatabase.registerEntity = function (model) {
if (ORMDatabase._ormDatabase && this._installed.indexOf(model) !== -1) {
if (this._installed.indexOf(model) !== -1) {
console.error("Unable to register entity " + model.name + ". Entity already registered.");

@@ -17,2 +16,3 @@ return;

};
ORMDatabase._ormDatabase = new VuexORM.Database();
ORMDatabase._installed = [];

@@ -19,0 +19,0 @@ return ORMDatabase;

{
"name": "vuex-orm-decorators",
"version": "1.1.3",
"version": "1.1.4",
"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",

@@ -21,3 +21,2 @@ import { Model, Attribute } from '@vuex-orm/core';

return (target: Object, propertyName: string | symbol): void => {
console.log(propertyName);
(target.constructor as any)._fields = (target.constructor as any)._fields || {};

@@ -24,0 +23,0 @@ (target.constructor as any)._fields[propertyName] = fieldType;

@@ -7,7 +7,6 @@ import VuexORM, { Model, Database } from '@vuex-orm/core';

private static _ormDatabase: Database;
private static _ormDatabase = new VuexORM.Database();
private static _installed = <typeof Model[]>[];
public static install(): Plugin<any> {
ORMDatabase._ormDatabase = new VuexORM.Database();
return VuexORM.install(ORMDatabase._ormDatabase);

@@ -17,3 +16,3 @@ }

public static registerEntity(model: typeof Model) {
if (ORMDatabase._ormDatabase && this._installed.indexOf(model) !== -1) {
if (this._installed.indexOf(model) !== -1) {
console.error(`Unable to register entity ${model.name}. Entity already registered.`)

@@ -20,0 +19,0 @@ return;

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