js-round

Library for rounding JS numbers

Usage no npm install needed!

<script type="module">
  import jsRound from 'https://cdn.skypack.dev/js-round';
</script>

README

js-round

Library for correct rounding JS number

const {round} = require('js-round'); // import {round} from 'js-round';

const nubmer = round(123.456, 2);
assert number === 123.46