Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.0.8 to 1.1.0

dist/database.js

1

dist/attributes.js

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

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

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

@@ -0,1 +1,2 @@

import ORMDatabase from './database';
/**

@@ -9,4 +10,7 @@ * Creates an vuex-orm Model

constructor.entity = entityName;
constructor.baseEntity = parentEntity;
if (parentEntity) {
constructor.baseEntity = parentEntity;
}
constructor.fields = function () { return constructor._fields || {}; };
ORMDatabase.registerEntity(constructor);
return constructor;

@@ -13,0 +17,0 @@ };

2

package.json
{
"name": "vuex-orm-decorators",
"version": "1.0.8",
"version": "1.1.0",
"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,2 +21,3 @@ 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 || {};

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

import { Model } from '@vuex-orm/core';
import ORMDatabase from './database';

@@ -12,7 +13,9 @@ /**

(constructor as any).entity = entityName;
(constructor as any).baseEntity = parentEntity;
if (parentEntity) { (constructor as any).baseEntity = parentEntity; }
(constructor as any).fields = () => (constructor as any)._fields || {};
ORMDatabase.registerEntity(constructor as unknown as typeof Model);
return constructor;
};
}

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