New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vue-const

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-const

Adds a constants section in Vue components.

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

vue-const

Adds a constants section in Vue components.

npm npm bundle size (minified + gzip) npm NpmLicense

Install:

npm install vue-const

or

yarn add vue-const

Enable it in your project:

import VueConst from 'vue-const';
Vue.use(VueConst);

You can now declare your constants (must use all upper case identifiers):

export default {
  const: {
    NAME_OF_CONSTANT: value1, 
    OTHER: value2, 
    ...
  }
}

Constants defined this way are used like any data property (for example by this.NAME in code or simply NAME in templates). Obviously, they are not reactive.

Keywords

vue

FAQs

Package last updated on 10 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts