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

tax-round-br

v0.4.1

Published

Tax Round according Brazilian Laws

Downloads

9

Readme

tax-round-br NPM version

Rounding of federal taxes in Brazil uses asymmetric arithmetic round.

Rounding of federal taxes in Brazil is discussed in the IN 1145/20155 : Instrução Normativa nº 1145/2011 Rounding should be done based on the 2nd decimal place as follows: Evaluate the 3rd decimal place: If it is less then 5, the value of previous decimal place should be kept. If it is greater then 5, the value of the previous decimal place should be increased by one. If it is equal to 5, the next decimal place should be evaluate the fourth decimal place as follows: If it's value is between 0 and 4, the value of the first decimal place should be kept. If it's value is between 5 and 9, the value of the first decimal place should be increased by one.

The original text in Portuguese "Parágrafo único. O arredondamento do algarismo da casa decimal de que trata o inciso I do caput será efetuado levando-se em consideração o algarismo relativo à 2ª (segunda) casa decimal, do modo a seguir: I - menor que 5 (cinco), permanecerá o algarismo da 1ª (primeira) casa decimal; II - maior que 5 (cinco), acrescentar-se-á uma unidade ao algarismo da 1ª (primeira) casa decimal; e III - igual a 5 (cinco), deverá ser analisada a 3ª (terceira) casa decimal, da seguinte maneira: a) quando o algarismo estiver compreendido entre 0 (zero) e 4 (quatro), permanecerá o algarismo da 1ª (primeira) casa decimal; e b) quando o algarismo estiver compreendido entre 5 (cinco) e 9 (nove), acrescentar-se-á uma unidade ao algarismo da 1ª (primeira) casa decimal." (NR)".

##Use

###To build

npm install -d

###To run the tests

gulp

###To use in your project

Required Dependency Status devDependency Status

  • node.js 4+
    npm install tax-round-br

In your code:

let roundTax = require('tax-round-br');

let valueRounded = roundTax(100/3);