Mottie / javascript-number-formatter

Lightweight & Fast JavaScript Number Formatter
http://mottie.github.io/javascript-number-formatter/
MIT License
141 stars 37 forks source link

Should 1.1.12 have been a major version? #17

Closed nathanpower closed 5 years ago

nathanpower commented 6 years ago

The new handling of negative numbers seems like it should have been considered a breaking change.

rankida commented 6 years ago

Note the first example in the readme is now wrong.

format("#,##0.####", 1234567.89); // output: "1,234,567.89"
format("$ #,###.00", -1234567.89); // output: "$ -1,234,567.89"

image

Please consider un-publishing and republishing as major

Mottie commented 6 years ago

Sorry! I totally forgot it was a breaking change.

I've unpublished for now. I'll add it back with a minor update and a new option to turn that behavior on & off.

Veoth commented 6 years ago

Hi, have you considered re-plublishing it ? I could use ts support !

Thanx

josephpage commented 5 years ago

@Mottie Could you please publish the 2.0.0 release ? 🎉
Negative and Positive Signs are a game-changing feature !

Mottie commented 5 years ago

Done... v2.0.0 has been released. I renamed the ignoreSign option to enforceMaskSign which is now false by default. Examples added to the readme.

Mottie commented 5 years ago

Hmm, wow... even though all the tests pass, the readme examples and behavior with the enforceMaskSign is not what I am expecting.

Mottie commented 5 years ago

Haha, nevermind... I forgot to update the readme examples.