Skip to content

Angular2 pipes for BR types

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

thiagobruno-eti/ng2-brpipes

 
 

Repository files navigation

ng2-brpipes

Angular2 pipes for BR types.

How to install

npm install ng2-brpipes --save

Or use yarn to prevent broken updated dependencies

yarn add ng2-brpipes

How to Import the Module

There's only a main module, just import it globaly or wherever you want to use it:

import {Ng2BRPipesModule} from 'ng2-brpipes';

@NgModule({
  imports: [Ng2BRPipesModule]
  exports: [Ng2BRPipesModule]
})
export class MyModule { }

Available pipes

RealPipe (NEW)

Transform number to Real currency like format.

{{'9999.99' | real}} // output R$9.999,99

CpfPipe

Transform string in CPF like format.

{{'01964256119' | cpf}} // output 019.642.561-19

CnpjPipe

Transform string in CNPJ like format.

{{'99999999999999' | cnpj}} // output 99.999.999/9999-99

CpfCnpjPipe

Transform string in CPF or CNPJ like format. Accepts both types.

{{'01964256119' | cpfCnpj}} // output 019.642.561-19
{{'99999999999999' | cpfCnpj}} // output 99.999.999/9999-99

CepPipe

Transform string in CEP like format.

{{'72006226' | cep}} // output 72006-226

CeiPipe

Transform string in CEI like format.

{{'761198762985' | cei}} // output 76.119.87629/85

TelefonePipe

Transform string in Telefone like format. Supports 8 and 9 digits phone numbers

{{'3196098689' | telefone}} // output (31)9609-8689

{{'31996098689' | telefone}} // output (31)99609-8689

About

Angular2 pipes for BR types

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.7%
  • JavaScript 13.3%