Closed mycroftjr closed 2 weeks ago
We don't have any plans to use or provide an alternative of Numeral.js (it's the library that we used for nFormat
API). For the ordinal indicator, you can use Intl.PluralRules()
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/PluralRules#using_options
We don't have any plans to use or provide an alternative of Numeral.js (it's the library that we used for
nFormat
API). For the ordinal indicator, you can useIntl.PluralRules()
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/PluralRules#using_options
Ah, could you perhaps mention that alongside the other ns.format methods as alternatives in the deprecation notice?
It's a minor issue, but if nFormat is removed at the moment, then there will be no decent alternative to
ns.nFormat(num, '0o')
remaining (I believe the o stands for ordinal. It basically adds the suffixes for "1st", "2nd", "3rd", etc).My scripts currently use this format string when talking about investment rounds for corporations - i.e.