JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 113
  • Score
    100M100P100Q68458F
  • License MIT

:running: Vue.js directive to add a document event listener on escape keyup.

Package Exports

  • vue-esc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-esc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-esc

🏃 Vue.js directive to add a document event listener on escape keyup.

Installation

npm i -S vue-esc

Usage

main.js

import Vue     from 'vue';
import VueEsc from 'vue-esc';

Vue.use(VueI18n);
Vue.use(VueEsc);

Component.vue

<script>
  export default {
    name: 'Component',

    methods: {
      escape() {
        console.log('Escaping...');
      }
    }
  };
</script>

<template lang='pug'>
  div(v-esc='escape')   
</template>

Development Setup

# install dependencies
$ npm install

# dev mode
$ npm run dev

# test
$ npm run test

# build
$ npm run build