thingco / shared-frontend-libs

0 stars 0 forks source link

Data transformers package #93

Closed DanCouper closed 2 years ago

DanCouper commented 2 years ago

This moves the pure (albeit using the Intl browser API, see note) JS logic for data formatting/calculation into its own package, @thingco/data-transformers-core.

The React bindings are to be included in a separate package, @thingco/data-transformers-react

So:

Regarding the Intl API, I originally ripped it out and started writing formatting functions as a replacement, but going forward this makes it too difficult to reintrocuce localisation. So instead, will want to add a conditional polyfill for Android devices, and note that this will need each localisation file added.

The polyfills are available here: https://formatjs.io/docs/polyfills/