Skip to content

Format: Use plain functions instead of curried functions #457

@charlieTheBotDev

Description

@charlieTheBotDev

Context

Currently, to format a number, you have to create a formatter:

const formatter = hx.format.si(2)
const formattedVal = formatter(myVal)

Expected Behavior

It should be possible to do something like:

import { formatSi } from 'hexagon-js'
const formattedVal = formatSi(myVal, { sf: 2 })

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions