"megabyte" is the only supported unit at present. It's a long list and that's a known use case for Unsplash web, but further units would be very simple to add.
The top six globally-traded currencies are supported. This PR takes the view that on balance a whitelist of currencies is, for now at least, the lesser evil, weighing between maintainability and safety.
::percent compiles to an Intl.NumberFormat constructor options object of { style: 'percent' }, which formats as a ratio (1 as 100%). We could alternatively compile to { style: 'unit', unit: 'percent' } which'd format 1 as 1%.
Further ICU number skeleton features can be supported upon a use case appearing (or a feature request for any onlookers!).
Before we start using these skeletons in unsplash-web I think it's worth running this past Carmen to check that there won't be any issues with the vendor's parsing of the ICU syntax.
Closes #20.
The following are supported as of this PR:
"megabyte" is the only supported unit at present. It's a long list and that's a known use case for Unsplash web, but further units would be very simple to add.
The top six globally-traded currencies are supported. This PR takes the view that on balance a whitelist of currencies is, for now at least, the lesser evil, weighing between maintainability and safety.
::percent
compiles to anIntl.NumberFormat
constructor options object of{ style: 'percent' }
, which formats as a ratio (1
as100%
). We could alternatively compile to{ style: 'unit', unit: 'percent' }
which'd format1
as1%
.Further ICU number skeleton features can be supported upon a use case appearing (or a feature request for any onlookers!).