Vue-Versions
vue-versions is a module to provide the installed Vue full version as in (x.y.z) and the individual major (x), minor(y), and patch(z) as well. It is useful for community plugins and components with different implementations for different versions of Vue.js.
dependencies (1): vue.
devDependencies (5): @types/node, terser, typescript.
Installation
With NPM:
$ npm i vue-versions
With Yarn:
$ yarn add vue-versions
Usage
import { Vue, Component } from 'vue-property-decorator';
import VueVersions from 'vue-versions';
@Component({ template: require('[PATH_TO_TEMPLATE]') })
export default class [CLASS_NAME] extends Vue {
public vs: VueVersions = new VueVersions();
mounted() {
console.log(this.vs.getVersionNumber(Vue));
console.log(this.vs.getVersionNumber(Vue, 'major'));
console.log(this.vs.getVersionNumber(Vue, 'minor'));
console.log(this.vs.getVersionNumber(Vue, 'patch'));
this.vs.getVersionNumber(Vue, 'test'); // should throw an error in the console.
}
}
:loudspeaker:: Awareness, :pencil:: Blogposts, :computer:: Code, :art:: Design, :books:: Documentation.
We will be very grateful if you support the project with anything you have, and can.
It will help us with a few resources we need in order to keep improving the project and also to provide more useful components and plugins. We will also display your logo and organization name in the Financial Contributors section below.
Or
The MIT License (MIT).
Copyright (c) 2020, Yufenyuy Veyeh Didier.