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

picomask

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picomask

Very small integer text mask for basic applications.

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-31%
Maintainers
2
Weekly downloads
 
Created
Source

picomask

npm version test coverage npm bundle size

Very small integer text mask for basic applications.

Usage

import { picomask, transform } from 'picomask'

const mask = picomask('09072021', 'mm/dd/yyyy')

// => { value: '09/07/2021', m: '09', d: '07', y: '2021' }

const anotherMask = transform(mask, 'yyyy-mm-dd')

// => { value: '2021-09-07', m: '09', d: '07', y: '2021' }

Other Examples

picomask('07092021', 'dd-mm-yyyy') // => { value: '07-09-2021', ... }
picomask('20210907', 'yyyy-mm-dd') // => { value: '2021-09-07', ... }
picomask('1231231234', '(nnn) nnn-nnnn') // => { value: '(123) 123-1234', ... }
picomask('0624', 'mm/yy') // => { value: '06/24', ... }
picomask('4242424242424242', 'cccc cccc cccc cccc') // => { value: '4242 4242 4242 4242', ... }

License

MIT License © Truework

Keywords

FAQs

Package last updated on 10 Nov 2021

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