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

vue-input-facade

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-input-facade

A lightweight and dependency free input facade created specific for Vue

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.3K
decreased by-11.65%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Input Facade

A lightweight and dependency free input facade created specific for Vue

Docs and Demo

Install

yarn add vue-input-facade
or
npm i vue-input-facade

Usage (two flavors)

Global

import InputFacade from 'vue-input-facade'
Vue.use(InputFacade)

Local (inside the component)

import { InputFacade } from 'vue-input-facade'
export default {
  components: { InputFacade }
}

Local (as directive)

import { facade } from 'vue-input-facade'
export default {
  directives: { facade }
}

Local (as filter)

import { masker } from 'vue-input-facade'
export default {
  filters: { facade: masker }
}

Tokens

'#': {pattern: /\d/},
'X': {pattern: /[0-9a-zA-Z]/},
'S': {pattern: /[a-zA-Z]/},
'A': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleUpperCase()},
'a': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleLowerCase()},
'!': {escape: true}

Properties

PropertyRequiredTypeDefaultDescription
valuefalseStringInput value or v-model
maskfalseString, ArrayMask pattern
maskedfalseBooleanfalseemit value with mask chars, default is raw
tokensfalseObjecttokensCustom tokens for mask

Thanks

Thanks to Marcos Neves for the vue-the-mask component of which this vue-input-facade was originally forked from.

Contribution

You're free to contribute to this project by submitting Issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. Your name will be added to the hall of fame ;)

License

This project is licensed under MIT License

Keywords

FAQs

Package last updated on 13 Dec 2019

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

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