tusharshyoran / AdformAssignment

0 stars 0 forks source link

provide a function to handle thousands and millions, billions #2

Open pavelmickevic opened 4 years ago

pavelmickevic commented 4 years ago

please provide a function to handle thousands and millions, billions

https://github.com/tusharshyoran/AdformAssignment/blob/8212d27fe3ba19b18e8706f0b3e7bee0fdad22d1/src/utils/index.js#L2

please update your's data.js, with bigger numbers, to see how this function acts.

Also please check how this gonna work with decimals.

ex.:

      "budget": 188377,

      "budget": 288377000,

      "budget": 8377.50,
tusharshyoran commented 4 years ago

Implemented the same under utils

pavelmickevic commented 4 years ago

good.

IMO, intl utility is the right approach!

P.S. next time you can paste the hyperlink directly to a implemented file or a specific commit, try it out. either use the short SHA of a specific commit, or try to use link-to-repo-file with #...L10-L15 in the url