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

ghilardinfe

v2.0.15

Published

Pacote para leitura de NFE XML em objetos JavaScript.

Downloads

18

Readme

GhilardiNFE - Alpha

Pacote para leitura de NFE XML em objetos JavaScript.

Table of contents

Quick start

$ npm install ghilardinfe

app.js

var fs = require('fs'),
    ghilardinfe = require('ghilardinfe');

fs.readFile('nfe.xml','utf8',function(err, data) {
  ghilardinfe(data, function(err, nfe) {
    console.log(nfe.emissor.getNome());
  });
});

API

Cobrança

  • get:
    • Returns getParcelas()
  • getNumParcelas:
    • Returns Number Numero de parcelas
  • getParcelas:
    • Returns Array Array com todas as parcelas
  • getParcela:
    • Busca parcela especifica.
    • Parameters
      • Number: Numero da parcela, partindo de 0
    • Returns Object Numero, vencimento e valor da parcela

Compra

  • get:
    • Returns Object pedido e contrato
  • getPedido:
    • Returns String
  • getContrato:
    • Returns String

Destino

  • get:
    • Returns Object cnpj, nome, ie e email
  • getCNPJ:
    • Returns String
  • getNome:
    • Returns String
  • getIE:
    • Returns String
  • getEmail:
    • Returns String

Emissor

  • get:
    • Returns Object cnpj, nome, fantasia, ie, crt e endereco
  • getCNPJ:
    • Returns String
  • getNome:
    • Returns String
  • getFantasia:
    • Returns String
  • getIE:
    • Returns String
  • getCRT:
    • Returns Number

Endereco

  • getEndereco:
    • Returns Object logradouro, numero, bairro, municipio, uf, cep, pais e telefone
  • getLogradouro:
    • Returns String
  • getNumero:
    • Returns Number
  • getBairro:
    • Returns String
  • getMunicipio:
    • Returns String
  • getUF:
    • Returns String
  • getCEP:
    • Returns Number
  • getPais:
    • Returns String
  • getTelefone:
    • Returns Number

Identificador

  • get:
    • Returns Object uf, chave, naturezaOperacao, indicacaoPagamento, modelo, serie, numero, dataEmissao, tipo, municipioFatoGerador, digitoVerificador, ambiente e finalidade
  • getUF:
    • Returns Number
  • getChave:
    • Returns Number
  • getNaturezaOperacao:
    • Returns String
  • getIndicacaoPagamento:
    • Returns Number
  • getModelo:
    • Returns Number
  • getSerie:
    • Returns Number
  • getNumero:
    • Returns Number
  • getDataEmissao:
    • Returns Date
  • getTipo:
    • Returns Number
  • getMunicipioFatoGerador:
    • Returns Number
  • getDigitoVerificador:
    • Returns Number
  • getAmbiente:
    • Returns Number
  • getFinalidade:
    • Returns Number

Informações Adicionais

  • get:
    • Returns Object Inf. Ad. Fisco, Inf. Complementar.

Impostos

  • getImpostos:
    • Returns Object ICMS 60, PIS e COFINS

Produtos

  • get:
    • Parameters
      • Indice: Vazio ou indice da lista de produtos desejado, partindo de 0
    • Returns Object ou Array
  • getNumProdutos:
    • Returns Number

Produto

  • get:
    • Returns Object codigo, ean, descricao, ncm, cfop, uCom, qCom, vUnCom, valor, eanTrib, uTrib, qTrib, vUnTrib, indTot e impostos
  • getCodigo:
    • Returns String
  • getEAN:
    • Returns Number
  • getDescricao:
    • Returns String
  • getNCM:
    • Returns Number
  • getCFOP:
    • Returns Number
  • getUCom:
    • Returns String
  • getQCom:
    • Returns Number
  • getVUnCom:
    • Returns Number
  • getValor:
    • Returns Number
  • getEANTrib:
    • Returns Number
  • getUTrib:
    • Returns String
  • getQTrib:
    • Returns Number
  • getVUnTrib:
    • Returns Number
  • getIndTot:
    • Returns Number

Produto COFINS

  • get:
    • Returns Object cst, bc, aliquota e valor
  • getCST:
    • Returns Number
  • getBC:
    • Returns Number
  • getAliquota:
    • Returns Number
  • getValor:
    • Returns Number

Produto ICMS

  • get:
    • Returns Object orig, cst, bcStRet e icmsStRet
  • getOrig:
    • Returns Number
  • getCST:
    • Returns Number
  • getBCSTRet:
    • Returns Number
  • getICMSSTRet:
    • Returns Number

Produto IPI

  • get:
    • Returns Object cst, vBc, pIPI, vIPI
  • getCST:
    • Returns Number
  • getBC:
    • Returns Number
  • getPercIPI:
    • Returns Number
  • getValorIPI:
    • Returns Number

Produto PIS

  • get:
    • Returns Object cst, bc, aliquota e valor
  • getCST:
    • Returns Number
  • getBC:
    • Returns Number
  • getAliquota:
    • Returns Number
  • getValor:
    • Returns Number

Total

  • get:
    • Returns Object ICMS, ISSQN e Retenção

Total ICMS

  • get:
    • Returns Object orig, cst, bcStRet e icmsStRet
  • getOrig:
    • Returns Number
  • getCST:
    • Returns Number
  • getBCSTRet:
    • Returns Number
  • getICMSSTRet:
    • Returns Number

Total ISSQN

  • get:
    • Returns Object valor, bc, iss, pis e cofins
  • getValor:
    • Returns Number
  • getBC:
    • Returns Number
  • getISS:
    • Returns Number
  • getPIS:
    • Returns Number
  • getCOFINS:
    • Returns Number

Total Retenção

  • get:
    • Returns Object pis, cofins, csll, bcIrrf, irrf, bcPrevidencia e previdencia
  • getPIS:
    • Returns Number
  • getCOFINS:
    • Returns Number
  • getCSLL:
    • Returns Number
  • getBCIRRF:
    • Returns Number
  • getIRRF:
    • Returns Number
  • getBCPrevidencia:
    • Returns Number
  • getPrevidencia:
    • Returns Number