Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.17 KB

nifty-tou.tariffrate.parse.md

File metadata and controls

34 lines (21 loc) · 1.17 KB

Home > nifty-tou > TariffRate > parse

TariffRate.parse() method

Parse locale string values into a TariffRate instance.

Signature:

static parse(locale: string, id: string, amount: string, exponent?: string, description?: string): TariffRate;

Parameters

Parameter Type Description
locale string the locale to parse the amount and exponent string values as
id string the identifier
amount string the amount, as a number string in the locale locale
exponent string (Optional) a base-10 exponent to interpret amount in, as a number string in the locale locale; if not provided then 0 is assumed
description string (Optional) a description

Returns:

TariffRate

the new instance

Exceptions

TypeError if the amount or exponent can not be parsed as numbers