Home | Platform SDK


The Currency class provides methods to extract the numerical value out of any currency representation by normalising the input and removing any locale specific rules like symbols and use of commas.

Importing the Currency class

import { Currency } from "@arkecosystem/platform-sdk-intl";

Instantiating from ARK (with comma)

Currency.fromString("Ѧ 0,0001");

Instantiating from Brazilian Real

Currency.fromString("R$ 45,210.21");

Instantiating from USD

Currency.fromString("$ 45.210,21");

Instantiating from ARK (with point)

Currency.fromString("Ѧ 0.1000000081283");

Instantiating from a number


2020 © ARK.io | All rights reserved | An ARK.io Product