doc
Validate CPF/CNPJ.
Install
$ npm i @tadashi/doc
API
onlyNumber(c: string): Array<number>
isCnpj(c: string): boolean
isCpf(c: string): boolean
Usage
import {isCnpj, isCpf, onlyNumber} from '@tadashi/doc'
isCpf('090.885.670-93') // => true
isCnpj('29.249.091/0001-85') // => true
onlyNumber('1.2.3') // => [1, 2, 3]
License
MIT © Thiago Lagden