JSPM

@brazilian-utils/format-cnpj

0.1.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 410
  • Score
    100M100P100Q102258F
  • License MIT

Return CNPJ formatted with mask.

Package Exports

  • @brazilian-utils/format-cnpj

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@brazilian-utils/format-cnpj) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@brazilian-utils/format-cnpj

Return CNPJ formatted with mask.

Installation

# Yarn
yarn add @brazilian-utils/format-cnpj

# npm
npm install @brazilian-utils/format-cnpj --save

# UMD
<script type='text/javascript' src='https://unpkg.com/@brazilian-utils/format-cnpj/dist/index.umd.js'></script>

Usage

import formatCnpj from '@brazilian-utils/format-cnpj';

formatCnpj('46'); // 46
formatCnpj('468'); // 46.8
formatCnpj('468434'); // 46.843.4
formatCnpj('468434850'); // 46.843.485/0
formatCnpj('46843485000186'); // 46.843.485/0001-86