All Projects → imhugofonseca → portuguese-utils

imhugofonseca / portuguese-utils

Licence: MIT License
A set of useful utils for developing portuguese apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to portuguese-utils

ComoFazerUmaPerguntaPT
🤔 Farto de fazer perguntas e não ser respondido? Aprenda agora a melhor forma de fazer uma pergunta 🔥
Stars: ✭ 28 (+40%)
Mutual labels:  portugal, portuguese
timestampy
🕒 Bunch of utilities useful when working with UNIX timestamps
Stars: ✭ 21 (+5%)
Mutual labels:  package, utils
BETS
Package to obtain and analyze thousands of Brazilian economic time series
Stars: ✭ 34 (+70%)
Mutual labels:  package
laravel-provider
The Laravel Framework Service Provider for Railt
Stars: ✭ 19 (-5%)
Mutual labels:  package
bigger
bigg (bgfx + imgui + glfw + glm) + utils
Stars: ✭ 101 (+405%)
Mutual labels:  utils
ferryd
Fast, safe and reliable transit for the delivery of software updates to users.
Stars: ✭ 43 (+115%)
Mutual labels:  package
squad-v1.1-pt
Portuguese translation of the SQuAD dataset
Stars: ✭ 13 (-35%)
Mutual labels:  portuguese
laravel-meta
a package for working with models meta in laravel
Stars: ✭ 78 (+290%)
Mutual labels:  package
action
📦📊 GitHub Action to reports on the size of your npm package
Stars: ✭ 36 (+80%)
Mutual labels:  package
vim-npr
Sensible 'gf' for Node Path Relative JS module resolution per project 🐿
Stars: ✭ 19 (-5%)
Mutual labels:  package
scaffold-package-command
Scaffolds WP-CLI commands with functional tests, full README.md, and more.
Stars: ✭ 51 (+155%)
Mutual labels:  package
video-downloader
Video Downloader for Facebook.
Stars: ✭ 63 (+215%)
Mutual labels:  package
laravel-blog
Laravel Blog package
Stars: ✭ 116 (+480%)
Mutual labels:  package
pkglite
Compact Package Representations
Stars: ✭ 16 (-20%)
Mutual labels:  package
urley
📦 An easy cross-platform utility library to work with URLs in Javascript.
Stars: ✭ 14 (-30%)
Mutual labels:  utils
Smart-Inspector
Fluent re-take on Unity Inspector UX. Packed with QoL improvements.
Stars: ✭ 680 (+3300%)
Mutual labels:  utils
Resumos EMAP-FGV
Repositório de resumos do curso de Matemática Aplicada da FGV-EMAP
Stars: ✭ 23 (+15%)
Mutual labels:  portuguese
repogen
Easy-to-use signed APT repository generator with a web-based package browser.
Stars: ✭ 34 (+70%)
Mutual labels:  package
oexec
oexec is a Go package to execute shell commands in specified order
Stars: ✭ 21 (+5%)
Mutual labels:  package
ux
Laravel UI, Auth, & CRUD scaffolding package using Bootstrap & Livewire.
Stars: ✭ 34 (+70%)
Mutual labels:  package

Portuguese Javascript Utils

Maintainability Test Coverage npm Donate with Bitcoin

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.

<script src="https://cdn.jsdelivr.net/npm/portuguese-utils@latest/portuguese-utils.min.js" />
<script>
    portugueseUtils.isValidPostalCode('3863-122')
</script>

Using NPM

npm install --save portuguese-utils

Import the needed function

From the validators module

import { isValidPostalCode } from 'portuguese-utils/validators'

From the single exported function

import isValidPostalCode from 'portuguese-utils/validators/isValidPostalCode'

From the full package

import { isValidPostalCode } from 'portuguese-utils'

An the use the function as shown bellow

const postalCode = '3863-122'
const isMyPostalCodeValid = isValidPostalCode(postalCode)
console.log(isMyPostalCodeValid) // 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].