Gathering detailed insights and metrics for @titou10/v-mask
Gathering detailed insights and metrics for @titou10/v-mask
Gathering detailed insights and metrics for @titou10/v-mask
Gathering detailed insights and metrics for @titou10/v-mask
npm install @titou10/v-mask
Typescript
Module System
Node Version
NPM Version
TypeScript (94.44%)
JavaScript (5.56%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
22 Stars
36 Commits
3 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Jan 18, 2025
Latest Version
1.2.0
Package Id
@titou10/v-mask@1.2.0
Unpacked Size
15.58 kB
Size
5.56 kB
File Count
19
NPM Version
10.4.0
Node Version
20.10.0
Published on
Jan 27, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
5
A vue.js package that provides a directive to apply a mask to input tags
A"mask"
directive for Vue.js that sets the masked and unmasked value of an"input"
component (eg the"v-text-field"
component from vuetify)
"vue-the-mask"
:1npm install @titou10/v-mask --save 2yarn add @titou10/v-mask 3bower install @titou10/v-mask --save
1import { mask } from '@titou10/v-mask' 2export default { 3 directives: { mask } 4} 5<v-text-field v-model="..." v-mask="{mask:'A##', unmaskedVar: 'myVar'}" /> 6<v-text-field v-model="..." v-mask="'A#'" /> 7<v-text-field v-model="..." v-mask.number="{mask:'##', unmaskedVar: 'myVar'}" /> 8<v-text-field v-model="..." v-mask="{mask:'##', unmaskedVar: 'myVar', number: true}" /> 9
v-mask may be:
mask
: same as aboveunmaskedVar
: name of a variable defined in the "data" section of the component that will receive the "unmasked" text. It may be a structure (eg"a.bc.d"
), but the first "level" must existsnullIfEmpty
(Defaults to true ): Set"unmaskedVar"
to null if the input value is emptynumber
(Defaults to false): Try to cast the value of"unmaskedVar"
to number (see below)tokens
(Defaults to the default ones below): A structure of token objects that will replace the default ones. eg tokens="{ 'Y': {pattern: /[A-Z]/,transform: v => v.toLocaleUpperCase()}, '#': { pattern: /\d/} }"
'#': {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}
credit-card: '#### - #### - #### - ####'
credit-card2: '#### #### #### ####'
date: '##/##/####'
date-iso: '####-##-##'
date-with-time: '##/##/#### ##:##'
phone: '(###) ### - ####'
phone2: '### ### - ####'
social: '###-##-####'
time: '##:##'
time-with-seconds: '##:##:##'
postalcode-ca: 'A#A #A#'
.number
: The value set tounmaskedVar
is typecast as a number. If the value cannot be parsed with"parseFloat()"
, the original value is returned.
This package has been created after the"mask"
property of the"v-text-field"
component has been removed and I was not able to find another package that allow to retrieve the masked and unmasked value of an input text from a directive
Technically, it is a "merge" of thevue-the-mask
package, which is not maintained since years, and the oldmask
code from vuetify v1.5.x
Most of the credit goes to:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
Found 1/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More