npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

formatforms

v1.0.2

Published

funções uteis para formatação de campos de formularios

Downloads

15

Readme

formatForms

Funções para formatação de campos de formulários

Como usar?

npm install formatForms
const {
  formatMonetaryBR,
  formatDateBR,
  formatCNPJ,
  formatCPF,
  formatPhoneBR,
  formatCEP,
  formatRG,
  formatIE,
  formatIM,
  formatPIS,
  formatCNAE,
  formatCST,
  formatCFOP,
  formatNCM,
  formatNBS,
  formatNBM,
  formatMonetaryInternational,
  formatDateTimeBR,
  formatDateTimeUTC,
  formatDateTimeInternational,
  formatDateTimeISO,
  formatDateTimeUTCISO,
  formatDateToday,
} = require("formatForms");


-formatMonetaryBR: essa função irá formatar para BRL Real com o simbolo R$
-formatDateBR: essa função irá formatar para BRL date
-formatCNPJ: essa função irá formatar CNPJ
-formatCPF: essa função irá formatar CPF
-formatPhoneBR:  essa função irá formatar para BRL telefone
-formatCEP: essa função irá formatar  CEP
-formatRG: essa função irá formatar RG
-formatIE: essa função irá formatar IE
-formatIM: essa função irá formatar IM
-formatPIS: essa função irá formatar PIS
-formatCNAE: essa função irá formatar CNAE
-formatCST: essa função irá formatar CST
-formatCFOP: essa função irá formatar CFOP
-formatNCM: essa função irá formatar NCM
-formatNBS: essa função irá formatar NBS
-formatNBM: essa função irá formatar NBM
-formatMonetaryInternational: essa função irá formatar para International Real com o simbolo $
-formatDateTimeBR: essa função irá formatar para BRL DateTime
-formatDateTimeUTC: essa função irá formatar para UTC DateTime
-formatDateTimeInternational: essa função irá formatar para International DateTime
-formatDateTimeISO: essa função irá formatar para ISO DateTime
-formatDateTimeUTCISO: essa função irá formatar para UTC ISO DateTime
-formatDateToday: essa função irá formatar para Date Today
formatMonetaryBR(1000.00); // R$ 1.000,00
formatDateBR("2020-01-01"); // 01/01/2020
formatCNPJ("12345678901234"); // 12.345.678/9012-34
formatCPF("12345678901"); // 123.456.789-01
formatPhoneBR("11987654321"); // (11) 98765-4321
formatCEP("12345678"); // 12345-678
formatRG("123456789"); // 12.345.678-9
formatIE("123456789"); // 123.456.789
formatIM("123456789"); // 123.456.789
formatPIS("12345678901"); // 123.45678.90-1
formatCNAE("1234567"); // 12.34-5/67
formatCST("123456789"); // 123.456.789
formatCFOP("123456"); // 1234.56
formatNCM("12345678"); //
formatNBS("123456789"); // 1234.56.789
formatNBM("123456789"); // 1234.56.789
formatMonetaryInternational(1000.00); // $ 1,000.00
formatDateTimeBR("2020-01-01T00:00:00.000Z"); // 01/01/2020 00:00:00
formatDateTimeUTC("2020-01-01T00:00:00.000Z"); // 2020-01-01T00:00:00.000Z
formatDateTimeInternational("2020-01-01T00:00:00.000Z"); // 2020-01-01 00:00:00
formatDateTimeISO("2020-01-01T00:00:00.000Z"); // 2020-01-01T00:00:00.000Z
formatDateTimeUTCISO("2020-01-01T00:00:00.000Z"); // 2020-01-01T00:00:00.000Z
formatDateToday(); // 2020-01-01T00:00:00.000Z