The ultra-dev library is a set of resources for common development tasks.
Installation ultra-dev
npm install ultra-dev
General
- Credit card generator and validator
- Palondrome generator and validator
- Currency formatter
- Vehicle plate generator and validator
Brazil
- CPF generator and validator
- CNPJ generator and validator
- RG generator and validator
- CEP generator and validator
- CNH generator and validator
Method | Parameters | Return | Description |
---|---|---|---|
toGenerate |
withMask: boolean = false |
string |
Return a CPF. If "withMask" is set to true, the CPF will be returned with a mask |
validate |
value: string |
boolean |
Returns true if the value is valid |
Method | Parameters | Return | Description |
---|---|---|---|
toGenerate |
withMask: boolean = false |
string |
Return a CNPJ. If "withMask" is set to true, the CNPJ will be returned with a mask |
validate |
value: string |
boolean |
Returns true if the value is valid |
Method | Parameters | Return | Description |
---|---|---|---|
toGenerate |
withMask: boolean = false |
string |
Return a RG. If "withMask" is set to true, the RG will be returned with a mask |
validate |
value: string |
boolean |
Returns true if the value is valid |
Method | Parameters | Return | Description |
---|---|---|---|
toGenerate |
withMask: boolean = false |
string |
Return a Palindrome |
validate |
value: string |
boolean |
Returns true if the value is valid |
Method | Parameters | Return | Description |
---|---|---|---|
toGenerate |
brand: TypeCreditCardBrand |
IRetrunCreditCardBrand |
Returns a credit card according to the brands |
validate |
value: string |
boolean |
Returns true if the value is valid |
Method | Parameters | Return | Description |
---|---|---|---|
format |
value: number, currencySymbol: TypeCurrencySymbols = 'R$', decimalCount: number = 2, decimalSeparator: string = ',', thousandsSeparator: string = '.' |
string |
Returns the number in currency format |
removeFormatting |
value: string |
number |
Remove currency formatting |