Unit extends Collection

A Unit represents a single unit. A UnitFactor may be applied.

Unit instances are immutable and globally shared.

NameAbbreviationFormulaTypeSystemMultiplierAdditive
metermlengthmetric
gramgmassmetric0.001
secondsdurationmetric
ampereAcurrentmetric
kelvinKtemperaturemetric
molemolsubstancemetric
candelacdluminositymetric
dollarUSDcurrencycurrency
squareMeterm2areametric
cubicMeterm3volumemetric
meterPerSecondm/svelocitymetric
meterPerSecondSquaredm/s2accelerationmetric
reciprocalMeterm-1waveNumbermetric
kilogramPerCubicMeterkg/m3densitymetric
cubicMeterPerKilogramm3/kgspecificVolumemetric
amperePerSquareMeterA/m2currentDensitymetric
amperePerMeterA/mmagneticFieldStrengthmetric
molePerCubicMetermol/m3concentrationmetric
candelaPerSquareMetercd/m2luminancemetric
radianradm/mplaneAnglemetric
steradiansrm2/m2solidAnglemetric
hertzHzs-1frequencymetric
newtonNm1kg1/s2forcemetric
pascalPaN/m2pressuremetric
newtonMeterN1m1momentOfForcemetric
jouleJN1m1energymetric
wattWJ/spowermetric
coulombCs1A1electricChargemetric
voltVW/Avoltagemetric
faradFC/Vcapacitancemetric
ohmOHMV/AelectricResistancemetric
siemensSA/VelectricConductancemetric
weberWbV*smagneticFluxmetric
teslaTWb/m2magneticFluxDensitymetric
henryHWb/Ainductancemetric
lumenlmcd1sr1luminousFluxmetric
luxlxlm/m2illuminancemetric
becquerelBqs-1activitymetric
grayGyJ/kgabsorbedDosemetric
sievertSvJ/kgdoseEquivalentmetric
katalkatmol/scatalyticActivitymetric
pascalSecondPa1s1dynamicViscositymetric
newtonPerMeterN/msurfaceTensionmetric
radianPerSecondrad/sangularVelocitymetric
radianPerSecondSquaredrad/s2angularAccelerationmetric
wattPerSquareMeterW/m2irradiancemetric
joulePerKelvinJ/Kentropymetric
joulePerKilogramKelvinJ/kg1K1specificEntropymetric
joulePerKilogramJ/kgspecificEnergymetric
wattPerMeterKelvinW/m1K1thermalConductivitymetric
joulePerCubicMeterJ/m3energyDensitymetric
voltPerMeterV/melectricFieldStrengthmetric
coulombPerCubicMeterC/m3electricChargeDensitymetric
coulombPerSquareMeterC/m2electricFluxDensitymetric
faradPerMeterF/mpermittivitymetric
henryPerMeterH/mpermeabilitymetric
joulePerMoleJ/molmolarEnergymetric
joulePerMoleKelvinJ/mol1K1molarEntropymetric
coulombPerKilogramC/kgexposuremetric
grayPerSecondGy/sabsorbedDoseRatemetric
wattPerSteradianW/srradiantIntensitymetric
wattPerSquareMeterSteradianW/m2sr1radiancemetric
katalPerCubicMeterkat/m3catalyticConcentrationmetric
inchinlengthenglish0.0254
footftlengthenglish0.3048
cubitcubitlengthenglish0.4572
yardydlengthenglish0.9144
furlongfurlonglengthenglish201.168
milemilengthenglish1609.344
leagueleaguelengthenglish5556
chainchainlengthenglish20.1168
acreacrechain*furlongareaenglish
celsiusdegCtemperaturemetric273.15
fahrenheitdegFtemperatureenglish0.555555556255.372222222
rodrodlengthenglish5.0292
voidvoidnone
tontonmassmetric1000
minutemindurationmetric60
hourhdurationmetric3600
daydaydurationmetric86400
weekweekdurationmetric604800
monthmondurationmetric2419200
yearYrdurationmetric31449600
graingrmassenglish0.06479891
dramdrmassenglish0.00177185
ounceozmassenglish0.0283495
poundlbmassenglish0.45359237
hundredweightcwtmassenglish50.80234544
shortTonshortTonmassenglish907.18474
longTonlongTonmassenglish1016.04691
literLvolumemetric0.001
teaspoontspvolumemetric0.000004929
tablespoontbspvolumemetric0.000014787
fluidOunceflozvolumemetric0.000029574
cupcpvolumemetric0.000236588
pintptvolumemetric0.000473176
quartqtvolumemetric0.000946353
gallongalvolumemetric0.003785412
nauticalMilenautmilengthenglish1852
knotknotnautmi/hvelocityenglish
bitbitbitmetric
crumbcrumbbitmetric2
nibblenibblebitmetric4
byteBbitmetric8
planckLengthlPlengthplanck1.616199e-35
planckMassmPmassplanck2.17651e-8
planckTimetPdurationplanck5.39106e-44
planckChargeqPelectricChargeplanck1.875545956e-18
planckTemperatureTPtemperatureplanck1.416833e+32
planckArealP2areaplanck
planckVolumelP3volumeplanck
euroEURcurrencycurrency

static

parse(text: string): Unit

This will return the a unit for the given text. For example, "m/s" will return the unit for velocity in meters per second.

instance

abbreviation: string

Contains the abbreviation of the Unit. For example, "s" for "second", "g" for "gram", ...

baseAdditive: number

What to add to this unit in order to reach the normal for the given type. For example, the baseAdditive for "celsius" is 273.15.

baseMultiplier: number

What to multiply this unit by to reach the normal for the given type. For eaxmple, the normal for the "length" type is the "meter". Therefore, if this unit was the "centimeter", the baseMultiplier would be 0.01 since 1 centimeter is 1/100th of a meter.

factor: UnitFactor

The UnitFactor for this Unit. For example, the factor for the "kilogram" is "kilo".

formula: string

Contains the formula of this Unit if it is a derived type. For example, the "newton" is "m1kg1/s2", or 1 degree of meter, 1 degree of kilogram, and -2 degrees of second.

name: string

Contains the name of the Unit. For example, "gram", "second", ...

sid: string

This is a unique id like _id, used when integers cannot be used.

sid stands for "string ID".

system: UnitSystem

The UnitSystem for this Unit, i.e. "metric, "english", "planck", ...

type: UnitType

The UnitType for this Unit. For example, the type for the "newton" is "force".