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

vue-class-component

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-class-component - npm Package Compare versions

Comparing version 5.0.2 to 6.0.0

9

dist/vue-class-component.common.js
/**
* vue-class-component v5.0.2
* vue-class-component v6.0.0
* (c) 2015-2017 Evan You

@@ -16,3 +16,5 @@ * @license MIT

return function (target, key, index) {
var Ctor = target.constructor;
var Ctor = typeof target === 'function'
? target
: target.constructor;
if (!Ctor.__decorators__) {

@@ -81,3 +83,4 @@ Ctor.__decorators__ = [];

'deactivated',
'render'
'render',
'errorCaptured'
];

@@ -84,0 +87,0 @@ function componentFactory(Component, options) {

/**
* vue-class-component v5.0.2
* vue-class-component v6.0.0
* (c) 2015-2017 Evan You

@@ -9,10 +9,12 @@ * @license MIT

typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
(factory((global.VueClassComponent = global.VueClassComponent || {}),global.Vue));
(factory((global.VueClassComponent = {}),global.Vue));
}(this, (function (exports,Vue) { 'use strict';
Vue = Vue && 'default' in Vue ? Vue['default'] : Vue;
Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
function createDecorator(factory) {
return function (target, key, index) {
var Ctor = target.constructor;
var Ctor = typeof target === 'function'
? target
: target.constructor;
if (!Ctor.__decorators__) {

@@ -81,3 +83,4 @@ Ctor.__decorators__ = [];

'deactivated',
'render'
'render',
'errorCaptured'
];

@@ -84,0 +87,0 @@ function componentFactory(Component, options) {

/**
* vue-class-component v5.0.2
* vue-class-component v6.0.0
* (c) 2015-2017 Evan You
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t(e.VueClassComponent=e.VueClassComponent||{},e.Vue)}(this,function(e,t){"use strict";function o(e,t){t.prototype._init=function(){var t=this,o=Object.getOwnPropertyNames(e);if(e.$options.props)for(var n in e.$options.props)e.hasOwnProperty(n)||o.push(n);o.forEach(function(o){"_"!==o.charAt(0)&&Object.defineProperty(t,o,{get:function(){return e[o]},set:function(t){return e[o]=t}})})};var o=new t,n={};return Object.keys(o).forEach(function(e){void 0!==o[e]&&(n[e]=o[e])}),n}function n(e,n){void 0===n&&(n={}),n.name=n.name||e._componentTag||e.name;var r=e.prototype;Object.getOwnPropertyNames(r).forEach(function(e){if("constructor"!==e)if(u.indexOf(e)>-1)n[e]=r[e];else{var t=Object.getOwnPropertyDescriptor(r,e);"function"==typeof t.value?(n.methods||(n.methods={}))[e]=t.value:(t.get||t.set)&&((n.computed||(n.computed={}))[e]={get:t.get,set:t.set})}}),(n.mixins||(n.mixins=[])).push({data:function(){return o(this,e)}});var c=e.__decorators__;c&&c.forEach(function(e){return e(n)});var i=Object.getPrototypeOf(e.prototype);return(i instanceof t?i.constructor:t).extend(n)}function r(e){return"function"==typeof e?n(e):function(t){return n(t,e)}}t=t&&"default"in t?t.default:t;var u=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render"];!function(e){e.registerHooks=function(e){u.push.apply(u,e)}}(r||(r={}));var c=r;e.default=c,e.createDecorator=function(e){return function(t,o,n){var r=t.constructor;r.__decorators__||(r.__decorators__=[]),"number"!=typeof n&&(n=void 0),r.__decorators__.push(function(t){return e(t,o,n)})}},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t(e.VueClassComponent={},e.Vue)}(this,function(e,t){"use strict";function o(e,t){t.prototype._init=function(){var t=this,o=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||o.push(r);o.forEach(function(o){"_"!==o.charAt(0)&&Object.defineProperty(t,o,{get:function(){return e[o]},set:function(t){return e[o]=t}})})};var o=new t,r={};return Object.keys(o).forEach(function(e){void 0!==o[e]&&(r[e]=o[e])}),r}function r(e,r){void 0===r&&(r={}),r.name=r.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach(function(e){if("constructor"!==e)if(u.indexOf(e)>-1)r[e]=n[e];else{var t=Object.getOwnPropertyDescriptor(n,e);"function"==typeof t.value?(r.methods||(r.methods={}))[e]=t.value:(t.get||t.set)&&((r.computed||(r.computed={}))[e]={get:t.get,set:t.set})}}),(r.mixins||(r.mixins=[])).push({data:function(){return o(this,e)}});var c=e.__decorators__;c&&c.forEach(function(e){return e(r)});var i=Object.getPrototypeOf(e.prototype);return(i instanceof t?i.constructor:t).extend(r)}function n(e){return"function"==typeof e?r(e):function(t){return r(t,e)}}t=t&&t.hasOwnProperty("default")?t.default:t;var u=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"];!function(e){e.registerHooks=function(e){u.push.apply(u,e)}}(n||(n={}));var c=n;e.default=c,e.createDecorator=function(e){return function(t,o,r){var n="function"==typeof t?t:t.constructor;n.__decorators__||(n.__decorators__=[]),"number"!=typeof r&&(r=void 0),n.__decorators__.push(function(t){return e(t,o,r)})}},Object.defineProperty(e,"__esModule",{value:!0})});

@@ -1,4 +0,4 @@

import { ComponentOptions } from 'vue';
import Vue, { ComponentOptions } from 'vue';
import { VueClass } from './declarations';
export declare const $internalHooks: string[];
export declare function componentFactory(Component: VueClass, options?: ComponentOptions<any>): VueClass;
export declare function componentFactory(Component: VueClass<Vue>, options?: ComponentOptions<any, any, any, any>): VueClass<Vue>;

@@ -15,3 +15,4 @@ import Vue from 'vue';

'deactivated',
'render'
'render',
'errorCaptured'
];

@@ -18,0 +19,0 @@ export function componentFactory(Component, options) {

import Vue from 'vue';
import { VueClass } from './declarations';
export declare function collectDataFromConstructor(vm: Vue, Component: VueClass): {};
export declare function collectDataFromConstructor(vm: Vue, Component: VueClass<Vue>): {};

@@ -1,7 +0,7 @@

import Vue from 'vue';
export declare type VueClass = {
new (): Vue;
import Vue, { ComponentOptions } from 'vue';
export declare type VueClass<V extends Vue> = {
new (...args: any[]): V;
} & typeof Vue;
export declare type DecoratedClass = VueClass & {
__decorators__?: ((options: Vue.ComponentOptions<Vue>) => void)[];
export declare type DecoratedClass = VueClass<Vue> & {
__decorators__?: ((options: ComponentOptions<any, any, any, any>) => void)[];
};
import Vue, { ComponentOptions } from 'vue';
import { VueClass } from './declarations';
export { createDecorator } from './util';
declare function Component<U extends Vue>(options: ComponentOptions<U>): <V extends VueClass>(target: V) => V;
declare function Component<V extends VueClass>(target: V): V;
declare function Component<V extends Vue>(options: ComponentOptions<any, any, any, any> & ThisType<V>): <VC extends VueClass<V>>(target: VC) => VC;
declare function Component<VC extends VueClass<Vue>>(target: VC): VC;
declare namespace Component {

@@ -7,0 +7,0 @@ function registerHooks(keys: string[]): void;

import Vue, { ComponentOptions } from 'vue';
export declare const noop: () => void;
export declare function createDecorator(factory: (options: ComponentOptions<Vue>, key: string) => void): (target: Vue, key: string) => void;
export declare function createDecorator(factory: (options: ComponentOptions<Vue>, key: string, index: number) => void): (target: Vue, key: string, index: number) => void;
export interface VueDecorator {
(Ctor: typeof Vue): void;
(target: Vue, key: string): void;
(target: Vue, key: string, index: number): void;
}
export declare function createDecorator(factory: (options: ComponentOptions<any, any, any, any>, key: string, index: number) => void): VueDecorator;
export declare function warn(message: string): void;
export var noop = function () { };
export function createDecorator(factory) {
return function (target, key, index) {
var Ctor = target.constructor;
var Ctor = typeof target === 'function'
? target
: target.constructor;
if (!Ctor.__decorators__) {

@@ -6,0 +8,0 @@ Ctor.__decorators__ = [];

{
"name": "vue-class-component",
"version": "5.0.2",
"version": "6.0.0",
"description": "ES201X/TypeScript class decorator for Vue components",

@@ -19,3 +19,4 @@ "main": "dist/vue-class-component.common.js",

"dev:test": "node build/dev-test.js",
"test": "npm run build && webpack --config test/webpack.config.js && mocha test/test.build.js"
"test": "npm run build && webpack --config test/webpack.config.js && mocha test/test.build.js",
"release": "bash build/release.sh"
},

@@ -48,15 +49,15 @@ "repository": {

"css-loader": "^0.28.4",
"mocha": "^3.4.2",
"mocha": "^4.0.1",
"rimraf": "^2.6.1",
"rollup": "^0.43.0",
"rollup-plugin-replace": "^1.1.1",
"rollup": "^0.50.0",
"rollup-plugin-replace": "^2.0.0",
"testdouble": "^3.2.1",
"ts-loader": "^2.2.1",
"typescript": "^2.4.1",
"typescript": "^2.5.2",
"uglify-js": "^3.0.22",
"vue": "^2.3.4",
"vue": "github:vuejs/vue#dev",
"vue-loader": "^13.0.0",
"vue-template-compiler": "^2.3.4",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.0.0"
}
}

@@ -119,6 +119,7 @@ # vue-class-component

// Register the router hooks with thier names
// Register the router hooks with their names
Component.registerHooks([
'beforeRouteEnter',
'beforeRouteLeave'
'beforeRouteLeave',
'beforeRouteUpdate' // for vue-router 2.2+
])

@@ -125,0 +126,0 @@ ```

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