Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WeightUnit

WeightUnit is an "enum" like which represent all weights unit available in the unit converter.

author

Nicolas GILLE nic.gille@gmail.com

since

0.2.0

version

1.0

license

MIT

implements

EnumUnit

Hierarchy

  • WeightUnit

Implements

Index

Properties

Optional symbol

symbol: string

Symbol of the unit.

Optional value

value: number

Unit value for conversion.

Static CENTIGRAM

CENTIGRAM: WeightUnit = new WeightUnit('cg', 10)

Static DECAGRAM

DECAGRAM: WeightUnit = new WeightUnit('dag', 10000)

Static DECIGRAM

DECIGRAM: WeightUnit = new WeightUnit('dg', 100)

Static GRAM

GRAM: WeightUnit = new WeightUnit('g', 1000)

Static HECTOGRAM

HECTOGRAM: WeightUnit = new WeightUnit('hg', 100000)

Static KILOGRAM

KILOGRAM: WeightUnit = new WeightUnit('kg', 1000000)

Static MILLIGRAM

MILLIGRAM: WeightUnit = new WeightUnit('mg', 1)

Methods

Static value

  • Get a specific value of the enum.

    since

    0.2.0

    version

    1.0

    Parameters

    • symbol: string

      The name of the unit expected.

    Returns WeightUnit

    The WeightUnit expected.

Generated using TypeDoc