Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Small library to mask strings
$ npm install msk
const msk = require("msk");
msk("552122222222", "+99 (99) 9999-9999")
// "+55 (21) 2222-2222"
msk.fit("22231-0004131", "99999-999")
// "22231-000"
Returns a formatted string based on the mask prodived
Type: string
A string to apply the mask.
Type: string
A mask is formed based on the following symbols:
Symbol | Accepts |
---|---|
9 | Numbers ([0-9] ) |
A | Letters ([A-ú] ) |
S | Alphanumeric chars ([A-ú0-9] ) |
* | Anything |
other char | Specified char |
Returns a formatted string removing the exceeding characters.
msk("552122222222", "+99 (99) 9999-9999")
// "+55 (21) 2222-2222"
msk("V6G1C9", "A9A 9A9")
// "V6G 1C9"
msk("I love msk", "*-****-***")
// "I-love-msk"
msk.fit("22231-0004131", "99999-999")
// "22231-000"
MIT © VTEX
[1.0.5] - 2020-03-17
index.d.ts
in files
of package.json
.FAQs
Small library to mask strings
The npm package msk receives a total of 3,118 weekly downloads. As such, msk popularity was classified as popular.
We found that msk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.