This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ts-remask
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

reMask

A multi-mask lib

Install

yarn add remask

Usage

import { mask } from 'remask'

const value = 'ABC1C83'
const pattern = 'AAA - 9S99'

mask(value, pattern)
// ABC - 1C83

Pattern can be a pattern array, so remask choose one pattern based on pattern/value length match

const patterns = ['999.999.999-99', '99.999.999/9999-99']

mask('12345678901', patterns) // gets first pattern (999.999.999-99)
// 123.456.789-01

mask('12345678000106', patterns) // gets second pattern (99.999.999/9999-99)
// 12.345.678/0001-06

License

MIT © Bruno Bertolini

Readme

Keywords

none

Package Sidebar

Install

npm i ts-remask

Weekly Downloads

20

Version

0.2.0

License

MIT

Unpacked Size

6.14 kB

Total Files

8

Last publish

Collaborators

  • marconwillian