ms icon indicating copy to clipboard operation
ms copied to clipboard

Support optional rounding

Open CasperEngl opened this issue 3 years ago • 7 comments

This PR enables rounding through the roundoption.

round defaults to true and current solutions will continue to behave the same.

When round is set to false, all rounding is disabled.

When round is set to a number, it is used as precision for toFixed.

CasperEngl avatar Sep 23 '21 15:09 CasperEngl

Fixes #124 and #142

CasperEngl avatar Oct 04 '21 15:10 CasperEngl

@leerob Is anyone going through PRs on this repo?

CasperEngl avatar Dec 01 '21 16:12 CasperEngl

Yes, our current focus right now with ms is stability. We have a canary release that publishes ESM and converts to TypeScript: https://github.com/vercel/ms/releases

leerob avatar Dec 01 '21 17:12 leerob

All right. I'll see if I can change the target branch from master to canary 👍

CasperEngl avatar Dec 02 '21 08:12 CasperEngl

Those changes have been merged into master (will be main soon), there's just a canary release to test it out first. Main point was we're targeting stability, so likely will be slower to add new features to ms. There are over 100M weekly downloads of ms, so we're extremely cautious about what we add.

Thumbs up on this PR could be a good way to indicate how many people would like to see this feature land 👍

leerob avatar Dec 02 '21 14:12 leerob

I see. Thank you.

CasperEngl avatar Dec 02 '21 15:12 CasperEngl

Current conflicts have been resolved. I've also fixed some issues, having to do with the package name and lock file, since I had been using this package myself, deployed to npm.

CasperEngl avatar Jul 13 '22 13:07 CasperEngl