Portuguese Javascript Utils
A set of useful utils for developing Portuguese Web Applications.
How to install
Using CDN
You can use this lib in the browser using the minified bundle via CDN.
Using NPM
npm install --save portuguese-utils
Import the needed function
From the validators module
From the single exported function
From the full package
An the use the function as shown bellow
const postalCode = '3863-122'const isMyPostalCodeValid = console // true
Available Utils
Formaters
As the name says these utils allow to format input data
formatDate
formatDateExtended
formatDateTime
formatDecimalNumber
formatToCurrency
Validators
These utils allows you to validate input data
isValidCCNumber
isValidCPECUI
isValidCurrency
isValidHoliday
isValidLicensePlate
isValidMobileNumber
isValidNIF
isValidNISS
isValidNNU
isValidPostalCode
Helpers
These utils offer other helpers useful in portuguese apps
holidays
monthsExtended
monthsSlug
weekDays
weekDaysSlug
Documentation
Documentation of all utils is available at: https://portuguese-utils.netlify.com/
License
MIT