github formatjs/formatjs @formatjs/intl-numberformat@4.0.0

latest releases: react-intl@6.6.5, eslint-plugin-formatjs@4.13.0, @formatjs/editor@2.0.45...
3 years ago

4.0.0 (2020-05-23)

Features

  • @formatjs/intl-numberformat: Use native Intl.getCanonicalLocales (54cea38)

This is a rewrite of Intl.NumberFormat polyfill:

  • Feature compatible with ES2021 spec.
  • Pass most of Intl.NumberFormat test262 cases.
  • New version is 3 to 4 times faster in the benchmark of instantiating NumberFormat object + formatting numbers in currency or unit styles. It is almost 2 times faster in the benchmark variant that reuses the NumberFormat object.
  • Slightly reduce locale data JSON size.
  • Support compound unit like kilometer-per-second, where kilometer and second can be any simple unit whitelisted in [IsSanctionedSimpleUnitIdentifier][].
  • Polyfill for NumberFormat.prototype.toLocaleString.
  • Drop Unified prefix from the type definitions.
  • Reorganized source module structure.

BREAKING CHANGES

  • @formatjs/intl-numberformat: This requires @formatjs/intl-getcanonicallocales for
    IE11 and below

Don't miss a new formatjs release

NewReleases is sending notifications on new releases.