Options
All
  • Public
  • Public/Protected
  • All
Menu

convert

Index

References

Enumerations

Type aliases

Variables

Functions

References

default

Renames and exports convert

Type aliases

Angle

Angle: GetAliases<Angle>

Conversion

Conversion: [family: number, ratio: number, difference: number]

Data

Data: GetAliases<Data>

Force

Force: GetAliases<Force>

Length

Length: GetAliases<Length>

Mass

Mass: GetAliases<Mass>

Pressure

Pressure: GetAliases<Pressure>

Temperature

Temperature: GetAliases<Temperature>

Time

Time: GetAliases<Time>

Unit

Volume

Volume: GetAliases<Volume>

Variables

Const allUnits

allUnits: { B: readonly [1, 8, 0]; C: readonly [6, 1, 273.15]; De: readonly [6, -0.6666666666666666, 373.15]; F: readonly [6, 0.5555555555555556, 241.14999999999998]; K: readonly [6, 1, 0]; L: readonly [8, 0.001, 0]; M: readonly [3, 1852, 0]; MTON: readonly [8, 1.133, 0]; N: readonly [2, 1, 0]; NM: readonly [3, 1852, 0]; Pa: readonly [5, 1, 0]; R: readonly [6, 0.5555555555555556, 0]; S: readonly [7, 1e-13, 0]; TU: readonly [7, 0.001024, 0]; Torr: readonly [5, 133.32236842105263, 0]; US barrel: readonly [8, 0.164, 0]; US barrels: readonly [8, 0.164, 0]; US bbl: readonly [8, 0.164, 0]; US beer barrel: readonly [8, 0.117, 0]; US beer barrels: readonly [8, 0.117, 0]; US beer bbl: readonly [8, 0.117, 0]; US bsh: readonly [8, 0.0352391, 0]; US bu: readonly [8, 0.0352391, 0]; US bushel: readonly [8, 0.0352391, 0]; US bushels: readonly [8, 0.0352391, 0]; US cup: readonly [8, 0.00023658823649999998, 0]; US cups: readonly [8, 0.00023658823649999998, 0]; US dry barrel: readonly [8, 0.12, 0]; US dry barrels: readonly [8, 0.12, 0]; US dry bbl: readonly [8, 0.12, 0]; US dry gal: readonly [8, 0.00440488377086, 0]; US dry gallon: readonly [8, 0.00440488377086, 0]; US dry pint: readonly [8, 33.6003125, 0]; US dry pt: readonly [8, 33.6003125, 0]; US dry qt: readonly [8, 0.000946352946, 0]; US dry quart: readonly [8, 0.000946352946, 0]; US fl oz: readonly [8, 0.0000295735295625, 0]; US fl. oz.: readonly [8, 0.0000295735295625, 0]; US fluid ounce: readonly [8, 0.0000295735295625, 0]; US fluid ounces: readonly [8, 0.0000295735295625, 0]; US gal: readonly [8, 0.0037854111013237205, 0]; US gallon: readonly [8, 0.0037854111013237205, 0]; US gallons: readonly [8, 0.0037854111013237205, 0]; US gi: readonly [8, 0.00011829411824999999, 0]; US gill: readonly [8, 0.00011829411824999999, 0]; US gills: readonly [8, 0.00011829411824999999, 0]; US oz. fl.: readonly [8, 0.0000295735295625, 0]; US peck: readonly [8, 0.00909218, 0]; US pint: readonly [8, 0.000473176473, 0]; US pints: readonly [8, 0.000473176473, 0]; US pk: readonly [8, 0.00909218, 0]; US pt: readonly [8, 0.000473176473, 0]; US qt: readonly [8, 0.000946352946, 0]; US quart: readonly [8, 0.000946352946, 0]; US quarts: readonly [8, 0.000946352946, 0]; __proto__: null; a: readonly [7, 31536000, 0]; ac ft: readonly [8, 1233.48183754752, 0]; acre-feet: readonly [8, 1233.48183754752, 0]; acre-foot: readonly [8, 1233.48183754752, 0]; ac⋅ft: readonly [8, 1233.48183754752, 0]; atm: readonly [5, 101325, 0]; atmopshere: readonly [5, 101325, 0]; atmospheres: readonly [5, 101325, 0]; b: readonly [1, 1, 0]; bar: readonly [5, 100000, 0]; barrel: readonly [8, 0.15898756717224713, 0]; barrels: readonly [8, 0.15898756717224713, 0]; bars: readonly [5, 100000, 0]; bbl: readonly [8, 0.15898756717224713, 0]; bit: readonly [1, 1, 0]; bits: readonly [1, 1, 0]; board feet: readonly [8, 0.002359737, 0]; board foot: readonly [8, 0.002359737, 0]; byte: readonly [1, 8, 0]; bytes: readonly [1, 8, 0]; c: readonly [8, 0.00023658823649999998, 0]; catena: readonly [1, 24, 0]; catenas: readonly [1, 24, 0]; celsius: readonly [6, 1, 273.15]; centuries: readonly [7, 3155695200, 0]; century: readonly [7, 3155695200, 0]; crumb: readonly [1, 2, 0]; crumbs: readonly [1, 2, 0]; cu ft: readonly [8, 0.028, 0]; cu in: readonly [8, 0.000016387064, 0]; cu mi: readonly [8, 4200, 0]; cu yd: readonly [8, 0.76, 0]; cubic feet: readonly [8, 0.028, 0]; cubic foot: readonly [8, 0.028, 0]; cubic inch: readonly [8, 0.000016387064, 0]; cubic inches: readonly [8, 0.000016387064, 0]; cubic meter: readonly [8, 1, 0]; cubic meters: readonly [8, 1, 0]; cubic metre: readonly [8, 1, 0]; cubic metres: readonly [8, 1, 0]; cubic mile: readonly [8, 4200, 0]; cubic miles: readonly [8, 4200, 0]; cubic yard: readonly [8, 0.76, 0]; cubic yards: readonly [8, 0.76, 0]; d: readonly [7, 86400, 0]; day: readonly [7, 86400, 0]; days: readonly [7, 86400, 0]; dec: readonly [7, 315569520, 0]; decade: readonly [7, 315569520, 0]; decades: readonly [7, 315569520, 0]; deg: readonly [0, 0.017453292519943295, 0]; degree: readonly [0, 0.017453292519943295, 0]; degrees: readonly [0, 0.017453292519943295, 0]; degs: readonly [0, 0.017453292519943295, 0]; delisle: readonly [6, -0.6666666666666666, 373.15]; dibit: readonly [1, 2, 0]; dibits: readonly [1, 2, 0]; displacement ton: readonly [4, 1016046.9088000001, 0]; displacement tons: readonly [4, 1016046.9088000001, 0]; dyn: readonly [2, 0.00001, 0]; dyne: readonly [2, 0.00001, 0]; dynes: readonly [2, 0.00001, 0]; fahrenheit: readonly [6, 0.5555555555555556, 241.14999999999998]; feet: readonly [3, 0.3048, 0]; firkin: readonly [8, 0.041, 0]; firkins: readonly [8, 0.041, 0]; fn: readonly [7, 1209600, 0]; foot: readonly [3, 0.3048, 0]; fortnight: readonly [7, 1209600, 0]; fortnights: readonly [7, 1209600, 0]; ft: readonly [3, 0.3048, 0]; ft3: readonly [8, 0.028, 0]; ft³: readonly [8, 0.028, 0]; g: readonly [4, 1, 0]; gi: readonly [8, 0.0001420653125, 0]; gill: readonly [8, 0.0001420653125, 0]; gills: readonly [8, 0.0001420653125, 0]; gon: readonly [0, 0.015707963267948967, 0]; gons: readonly [0, 0.015707963267948967, 0]; grad: readonly [0, 0.015707963267948967, 0]; grade: readonly [0, 0.015707963267948967, 0]; grades: readonly [0, 0.015707963267948967, 0]; gradian: readonly [0, 0.015707963267948967, 0]; gradians: readonly [0, 0.015707963267948967, 0]; grads: readonly [0, 0.015707963267948967, 0]; gram: readonly [4, 1, 0]; grams: readonly [4, 1, 0]; h: readonly [7, 3600, 0]; halakim: readonly [7, 3.3333333333333335, 0]; halfbyte: readonly [1, 4, 0]; halfbytes: readonly [1, 4, 0]; helek: readonly [7, 3.3333333333333335, 0]; heptad: readonly [1, 7, 0]; heptade: readonly [1, 7, 0]; heptades: readonly [1, 7, 0]; heptads: readonly [1, 7, 0]; hexad: readonly [1, 6, 0]; hexade: readonly [1, 6, 0]; hexades: readonly [1, 6, 0]; hexads: readonly [1, 6, 0]; hextet: readonly [1, 16, 0]; hextets: readonly [1, 16, 0]; hour: readonly [7, 3600, 0]; hours: readonly [7, 3600, 0]; imp bbl: readonly [8, 0.16, 0]; imp bsh: readonly [8, 0.03636872, 0]; imp bu: readonly [8, 0.03636872, 0]; imp fl oz: readonly [8, 0.0000284130625, 0]; imp gal: readonly [8, 0.00454609, 0]; imp gi: readonly [8, 0.0001420653125, 0]; imp pk: readonly [8, 0.00909218, 0]; imp pt: readonly [8, 0.00056826125, 0]; imp qt: readonly [8, 0.0011365225, 0]; imperial barrel: readonly [8, 0.16, 0]; imperial barrels: readonly [8, 0.16, 0]; imperial bushel: readonly [8, 0.03636872, 0]; imperial bushels: readonly [8, 0.03636872, 0]; imperial fluid ounce: readonly [8, 0.0000284130625, 0]; imperial fluid ounces: readonly [8, 0.0000284130625, 0]; imperial gallon: readonly [8, 0.00454609, 0]; imperial gallons: readonly [8, 0.00454609, 0]; imperial peck: readonly [8, 0.00909218, 0]; imperial pecks: readonly [8, 0.00909218, 0]; imperial pint: readonly [8, 0.00056826125, 0]; imperial pints: readonly [8, 0.00056826125, 0]; imperial quart: readonly [8, 0.0011365225, 0]; imperial quarts: readonly [8, 0.0011365225, 0]; imperial ton: readonly [4, 1016046.9088000001, 0]; imperial tons: readonly [4, 1016046.9088000001, 0]; in: readonly [3, 0.0254, 0]; in3: readonly [8, 0.000016387064, 0]; inch: readonly [3, 0.0254, 0]; inches: readonly [3, 0.0254, 0]; in³: readonly [8, 0.000016387064, 0]; j: readonly [7, 0.016666666666666666, 0]; ja: readonly [7, 0.01, 0]; jiffies: readonly [7, 0.016666666666666666, 0]; jiffy: readonly [7, 0.016666666666666666, 0]; ke: readonly [7, 900, 0]; kelvin: readonly [6, 1, 0]; kelvins: readonly [6, 1, 0]; kgf: readonly [2, 9.80665, 0]; kilderkin: readonly [8, 0.08318, 0]; kilderkins: readonly [8, 0.08318, 0]; kilogram-force: readonly [2, 9.80665, 0]; kilopond: readonly [2, 9.80665, 0]; kiloponds: readonly [2, 9.80665, 0]; kp: readonly [2, 9.80665, 0]; l: readonly [8, 0.001, 0]; lb: readonly [4, 453.59237, 0]; lbf: readonly [2, 4.448222, 0]; liter: readonly [8, 0.001, 0]; liters: readonly [8, 0.001, 0]; litre: readonly [8, 0.001, 0]; litres: readonly [8, 0.001, 0]; long ton: readonly [4, 1016046.9088000001, 0]; long tons: readonly [4, 1016046.9088000001, 0]; m: readonly [3, 1, 0]; m3: readonly [8, 1, 0]; mTorr: readonly [5, 0.13332236842105263, 0]; md: readonly [7, 86.4, 0]; measurement ton: readonly [8, 1.133, 0]; measurement tons: readonly [8, 1.133, 0]; meter: readonly [3, 1, 0]; meters: readonly [3, 1, 0]; metre: readonly [3, 1, 0]; metres: readonly [3, 1, 0]; metric ton: readonly [4, 1000000, 0]; metric tons: readonly [4, 1000000, 0]; mi: readonly [3, 1609.344, 0]; mi3: readonly [8, 4200, 0]; mile: readonly [3, 1609.344, 0]; miles: readonly [3, 1609.344, 0]; millennia: readonly [7, 31556952000, 0]; millennium: readonly [7, 31556952000, 0]; milliday: readonly [7, 86.4, 0]; millidays: readonly [7, 86.4, 0]; millitorr: readonly [5, 0.13332236842105263, 0]; min: readonly [7, 60, 0]; minute: readonly [7, 60, 0]; minutes: readonly [7, 60, 0]; mi³: readonly [8, 4200, 0]; mo: readonly [7, 2592000, 0]; moment: readonly [7, 90, 0]; moments: readonly [7, 90, 0]; month: readonly [7, 2592000, 0]; months: readonly [7, 2592000, 0]; : readonly [8, 1, 0]; nautical mile: readonly [3, 1852, 0]; nautical miles: readonly [3, 1852, 0]; newton: readonly [2, 1, 0]; newtons: readonly [2, 1, 0]; nibble: readonly [1, 4, 0]; nibbles: readonly [1, 4, 0]; nmi: readonly [3, 1852, 0]; octad: readonly [1, 8, 0]; octade: readonly [1, 8, 0]; octades: readonly [1, 8, 0]; octads: readonly [1, 8, 0]; octect: readonly [1, 8, 0]; octects: readonly [1, 8, 0]; oilbbl: readonly [8, 0.15898756717224713, 0]; ounce: readonly [4, 28.349523125, 0]; ounces: readonly [4, 28.349523125, 0]; oz: readonly [4, 28.349523125, 0]; pascal: readonly [5, 1, 0]; pascals: readonly [5, 1, 0]; pdl: readonly [2, 0.138255, 0]; pentad: readonly [1, 5, 0]; pentads: readonly [1, 5, 0]; pk: readonly [8, 0.00909218, 0]; pound: readonly [4, 453.59237, 0]; pound of force: readonly [2, 4.448222, 0]; pound-force: readonly [2, 4.448222, 0]; poundal: readonly [2, 0.138255, 0]; poundals: readonly [2, 0.138255, 0]; pounds: readonly [4, 453.59237, 0]; quadbit: readonly [1, 4, 0]; quadbits: readonly [1, 4, 0]; quartet: readonly [1, 4, 0]; quartets: readonly [1, 4, 0]; r: readonly [0, 1, 0]; rad: readonly [0, 1, 0]; radian: readonly [0, 1, 0]; radians: readonly [0, 1, 0]; rads: readonly [0, 1, 0]; rankine: readonly [6, 0.5555555555555556, 0]; s: readonly [7, 1, 0]; second: readonly [7, 1, 0]; seconds: readonly [7, 1, 0]; semioctet: readonly [1, 4, 0]; semioctets: readonly [1, 4, 0]; sextet: readonly [1, 6, 0]; sextets: readonly [1, 6, 0]; shake: readonly [7, 1e-8, 0]; shakes: readonly [7, 1e-8, 0]; short ton: readonly [4, 907184.74, 0]; short tons: readonly [4, 907184.74, 0]; slab: readonly [1, 12, 0]; slabs: readonly [1, 12, 0]; st: readonly [4, 6350.293180000001, 0]; stere: readonly [8, 1, 0]; steres: readonly [8, 1, 0]; stone: readonly [4, 6350.293180000001, 0]; stones: readonly [4, 6350.293180000001, 0]; svedberg: readonly [7, 1e-13, 0]; svedbergs: readonly [7, 1e-13, 0]; t: readonly [4, 1000000, 0]; tablespoon: readonly [8, 0.000014786764781249999, 0]; tablespoons: readonly [8, 0.000014786764781249999, 0]; tbsp: readonly [8, 0.000014786764781249999, 0]; teaspoon: readonly [8, 0.0000049289215937500005, 0]; teaspoons: readonly [8, 0.0000049289215937500005, 0]; tetrad: readonly [1, 4, 0]; tetrade: readonly [1, 4, 0]; tetrades: readonly [1, 4, 0]; tetrads: readonly [1, 4, 0]; time unit: readonly [7, 0.001024, 0]; tonne: readonly [4, 1000000, 0]; tonnes: readonly [4, 1000000, 0]; torr: readonly [5, 133.32236842105263, 0]; torrs: readonly [5, 133.32236842105263, 0]; triad: readonly [1, 3, 0]; triade: readonly [1, 3, 0]; triades: readonly [1, 3, 0]; triads: readonly [1, 3, 0]; tribit: readonly [1, 3, 0]; tribits: readonly [1, 3, 0]; tsp: readonly [8, 0.0000049289215937500005, 0]; turn: readonly [0, 6.283185307179586, 0]; turns: readonly [0, 6.283185307179586, 0]; unibit: readonly [1, 1, 0]; unibits: readonly [1, 1, 0]; us ton: readonly [4, 907184.74, 0]; us tons: readonly [4, 907184.74, 0]; week: readonly [7, 604800, 0]; weeks: readonly [7, 604800, 0]; wk: readonly [7, 604800, 0]; y: readonly [7, 31536000, 0]; yard: readonly [3, 0.9144, 0]; yards: readonly [3, 0.9144, 0]; yd: readonly [3, 0.9144, 0]; yd3: readonly [8, 0.76, 0]; yd³: readonly [8, 0.76, 0]; year: readonly [7, 31536000, 0]; years: readonly [7, 31536000, 0]; yr: readonly [7, 31536000, 0]; °: readonly [0, 0.017453292519943295, 0]; : readonly [4, 28.349523125, 0] } = ...

Type declaration

  • B: readonly [1, 8, 0]
  • C: readonly [6, 1, 273.15]
  • De: readonly [6, -0.6666666666666666, 373.15]
  • F: readonly [6, 0.5555555555555556, 241.14999999999998]
  • K: readonly [6, 1, 0]
  • L: readonly [8, 0.001, 0]
  • M: readonly [3, 1852, 0]
  • MTON: readonly [8, 1.133, 0]
  • N: readonly [2, 1, 0]
  • NM: readonly [3, 1852, 0]
  • Pa: readonly [5, 1, 0]
  • R: readonly [6, 0.5555555555555556, 0]
  • S: readonly [7, 1e-13, 0]
  • TU: readonly [7, 0.001024, 0]
  • Torr: readonly [5, 133.32236842105263, 0]
  • US barrel: readonly [8, 0.164, 0]
  • US barrels: readonly [8, 0.164, 0]
  • US bbl: readonly [8, 0.164, 0]
  • US beer barrel: readonly [8, 0.117, 0]
  • US beer barrels: readonly [8, 0.117, 0]
  • US beer bbl: readonly [8, 0.117, 0]
  • US bsh: readonly [8, 0.0352391, 0]
  • US bu: readonly [8, 0.0352391, 0]
  • US bushel: readonly [8, 0.0352391, 0]
  • US bushels: readonly [8, 0.0352391, 0]
  • US cup: readonly [8, 0.00023658823649999998, 0]
  • US cups: readonly [8, 0.00023658823649999998, 0]
  • US dry barrel: readonly [8, 0.12, 0]
  • US dry barrels: readonly [8, 0.12, 0]
  • US dry bbl: readonly [8, 0.12, 0]
  • US dry gal: readonly [8, 0.00440488377086, 0]
  • US dry gallon: readonly [8, 0.00440488377086, 0]
  • US dry pint: readonly [8, 33.6003125, 0]
  • US dry pt: readonly [8, 33.6003125, 0]
  • US dry qt: readonly [8, 0.000946352946, 0]
  • US dry quart: readonly [8, 0.000946352946, 0]
  • US fl oz: readonly [8, 0.0000295735295625, 0]
  • US fl. oz.: readonly [8, 0.0000295735295625, 0]
  • US fluid ounce: readonly [8, 0.0000295735295625, 0]
  • US fluid ounces: readonly [8, 0.0000295735295625, 0]
  • US gal: readonly [8, 0.0037854111013237205, 0]
  • US gallon: readonly [8, 0.0037854111013237205, 0]
  • US gallons: readonly [8, 0.0037854111013237205, 0]
  • US gi: readonly [8, 0.00011829411824999999, 0]
  • US gill: readonly [8, 0.00011829411824999999, 0]
  • US gills: readonly [8, 0.00011829411824999999, 0]
  • US oz. fl.: readonly [8, 0.0000295735295625, 0]
  • US peck: readonly [8, 0.00909218, 0]
  • US pint: readonly [8, 0.000473176473, 0]
  • US pints: readonly [8, 0.000473176473, 0]
  • US pk: readonly [8, 0.00909218, 0]
  • US pt: readonly [8, 0.000473176473, 0]
  • US qt: readonly [8, 0.000946352946, 0]
  • US quart: readonly [8, 0.000946352946, 0]
  • US quarts: readonly [8, 0.000946352946, 0]
  • __proto__: null
  • a: readonly [7, 31536000, 0]
  • ac ft: readonly [8, 1233.48183754752, 0]
  • acre-feet: readonly [8, 1233.48183754752, 0]
  • acre-foot: readonly [8, 1233.48183754752, 0]
  • ac⋅ft: readonly [8, 1233.48183754752, 0]
  • atm: readonly [5, 101325, 0]
  • atmopshere: readonly [5, 101325, 0]
  • atmospheres: readonly [5, 101325, 0]
  • b: readonly [1, 1, 0]
  • bar: readonly [5, 100000, 0]
  • barrel: readonly [8, 0.15898756717224713, 0]
  • barrels: readonly [8, 0.15898756717224713, 0]
  • bars: readonly [5, 100000, 0]
  • bbl: readonly [8, 0.15898756717224713, 0]
  • bit: readonly [1, 1, 0]
  • bits: readonly [1, 1, 0]
  • board feet: readonly [8, 0.002359737, 0]
  • board foot: readonly [8, 0.002359737, 0]
  • byte: readonly [1, 8, 0]
  • bytes: readonly [1, 8, 0]
  • c: readonly [8, 0.00023658823649999998, 0]
  • catena: readonly [1, 24, 0]
  • catenas: readonly [1, 24, 0]
  • celsius: readonly [6, 1, 273.15]
  • centuries: readonly [7, 3155695200, 0]
  • century: readonly [7, 3155695200, 0]
  • crumb: readonly [1, 2, 0]
  • crumbs: readonly [1, 2, 0]
  • cu ft: readonly [8, 0.028, 0]
  • cu in: readonly [8, 0.000016387064, 0]
  • cu mi: readonly [8, 4200, 0]
  • cu yd: readonly [8, 0.76, 0]
  • cubic feet: readonly [8, 0.028, 0]
  • cubic foot: readonly [8, 0.028, 0]
  • cubic inch: readonly [8, 0.000016387064, 0]
  • cubic inches: readonly [8, 0.000016387064, 0]
  • cubic meter: readonly [8, 1, 0]
  • cubic meters: readonly [8, 1, 0]
  • cubic metre: readonly [8, 1, 0]
  • cubic metres: readonly [8, 1, 0]
  • cubic mile: readonly [8, 4200, 0]
  • cubic miles: readonly [8, 4200, 0]
  • cubic yard: readonly [8, 0.76, 0]
  • cubic yards: readonly [8, 0.76, 0]
  • d: readonly [7, 86400, 0]
  • day: readonly [7, 86400, 0]
  • days: readonly [7, 86400, 0]
  • dec: readonly [7, 315569520, 0]
  • decade: readonly [7, 315569520, 0]
  • decades: readonly [7, 315569520, 0]
  • deg: readonly [0, 0.017453292519943295, 0]
  • degree: readonly [0, 0.017453292519943295, 0]
  • degrees: readonly [0, 0.017453292519943295, 0]
  • degs: readonly [0, 0.017453292519943295, 0]
  • delisle: readonly [6, -0.6666666666666666, 373.15]
  • dibit: readonly [1, 2, 0]
  • dibits: readonly [1, 2, 0]
  • displacement ton: readonly [4, 1016046.9088000001, 0]
  • displacement tons: readonly [4, 1016046.9088000001, 0]
  • dyn: readonly [2, 0.00001, 0]
  • dyne: readonly [2, 0.00001, 0]
  • dynes: readonly [2, 0.00001, 0]
  • fahrenheit: readonly [6, 0.5555555555555556, 241.14999999999998]
  • feet: readonly [3, 0.3048, 0]
  • firkin: readonly [8, 0.041, 0]
  • firkins: readonly [8, 0.041, 0]
  • fn: readonly [7, 1209600, 0]
  • foot: readonly [3, 0.3048, 0]
  • fortnight: readonly [7, 1209600, 0]
  • fortnights: readonly [7, 1209600, 0]
  • ft: readonly [3, 0.3048, 0]
  • ft3: readonly [8, 0.028, 0]
  • ft³: readonly [8, 0.028, 0]
  • g: readonly [4, 1, 0]
  • gi: readonly [8, 0.0001420653125, 0]
  • gill: readonly [8, 0.0001420653125, 0]
  • gills: readonly [8, 0.0001420653125, 0]
  • gon: readonly [0, 0.015707963267948967, 0]
  • gons: readonly [0, 0.015707963267948967, 0]
  • grad: readonly [0, 0.015707963267948967, 0]
  • grade: readonly [0, 0.015707963267948967, 0]
  • grades: readonly [0, 0.015707963267948967, 0]
  • gradian: readonly [0, 0.015707963267948967, 0]
  • gradians: readonly [0, 0.015707963267948967, 0]
  • grads: readonly [0, 0.015707963267948967, 0]
  • gram: readonly [4, 1, 0]
  • grams: readonly [4, 1, 0]
  • h: readonly [7, 3600, 0]
  • halakim: readonly [7, 3.3333333333333335, 0]
  • halfbyte: readonly [1, 4, 0]
  • halfbytes: readonly [1, 4, 0]
  • helek: readonly [7, 3.3333333333333335, 0]
  • heptad: readonly [1, 7, 0]
  • heptade: readonly [1, 7, 0]
  • heptades: readonly [1, 7, 0]
  • heptads: readonly [1, 7, 0]
  • hexad: readonly [1, 6, 0]
  • hexade: readonly [1, 6, 0]
  • hexades: readonly [1, 6, 0]
  • hexads: readonly [1, 6, 0]
  • hextet: readonly [1, 16, 0]
  • hextets: readonly [1, 16, 0]
  • hour: readonly [7, 3600, 0]
  • hours: readonly [7, 3600, 0]
  • imp bbl: readonly [8, 0.16, 0]
  • imp bsh: readonly [8, 0.03636872, 0]
  • imp bu: readonly [8, 0.03636872, 0]
  • imp fl oz: readonly [8, 0.0000284130625, 0]
  • imp gal: readonly [8, 0.00454609, 0]
  • imp gi: readonly [8, 0.0001420653125, 0]
  • imp pk: readonly [8, 0.00909218, 0]
  • imp pt: readonly [8, 0.00056826125, 0]
  • imp qt: readonly [8, 0.0011365225, 0]
  • imperial barrel: readonly [8, 0.16, 0]
  • imperial barrels: readonly [8, 0.16, 0]
  • imperial bushel: readonly [8, 0.03636872, 0]
  • imperial bushels: readonly [8, 0.03636872, 0]
  • imperial fluid ounce: readonly [8, 0.0000284130625, 0]
  • imperial fluid ounces: readonly [8, 0.0000284130625, 0]
  • imperial gallon: readonly [8, 0.00454609, 0]
  • imperial gallons: readonly [8, 0.00454609, 0]
  • imperial peck: readonly [8, 0.00909218, 0]
  • imperial pecks: readonly [8, 0.00909218, 0]
  • imperial pint: readonly [8, 0.00056826125, 0]
  • imperial pints: readonly [8, 0.00056826125, 0]
  • imperial quart: readonly [8, 0.0011365225, 0]
  • imperial quarts: readonly [8, 0.0011365225, 0]
  • imperial ton: readonly [4, 1016046.9088000001, 0]
  • imperial tons: readonly [4, 1016046.9088000001, 0]
  • in: readonly [3, 0.0254, 0]
  • in3: readonly [8, 0.000016387064, 0]
  • inch: readonly [3, 0.0254, 0]
  • inches: readonly [3, 0.0254, 0]
  • in³: readonly [8, 0.000016387064, 0]
  • j: readonly [7, 0.016666666666666666, 0]
  • ja: readonly [7, 0.01, 0]
  • jiffies: readonly [7, 0.016666666666666666, 0]
  • jiffy: readonly [7, 0.016666666666666666, 0]
  • ke: readonly [7, 900, 0]
  • kelvin: readonly [6, 1, 0]
  • kelvins: readonly [6, 1, 0]
  • kgf: readonly [2, 9.80665, 0]
  • kilderkin: readonly [8, 0.08318, 0]
  • kilderkins: readonly [8, 0.08318, 0]
  • kilogram-force: readonly [2, 9.80665, 0]
  • kilopond: readonly [2, 9.80665, 0]
  • kiloponds: readonly [2, 9.80665, 0]
  • kp: readonly [2, 9.80665, 0]
  • l: readonly [8, 0.001, 0]
  • lb: readonly [4, 453.59237, 0]
  • lbf: readonly [2, 4.448222, 0]
  • liter: readonly [8, 0.001, 0]
  • liters: readonly [8, 0.001, 0]
  • litre: readonly [8, 0.001, 0]
  • litres: readonly [8, 0.001, 0]
  • long ton: readonly [4, 1016046.9088000001, 0]
  • long tons: readonly [4, 1016046.9088000001, 0]
  • m: readonly [3, 1, 0]
  • m3: readonly [8, 1, 0]
  • mTorr: readonly [5, 0.13332236842105263, 0]
  • md: readonly [7, 86.4, 0]
  • measurement ton: readonly [8, 1.133, 0]
  • measurement tons: readonly [8, 1.133, 0]
  • meter: readonly [3, 1, 0]
  • meters: readonly [3, 1, 0]
  • metre: readonly [3, 1, 0]
  • metres: readonly [3, 1, 0]
  • metric ton: readonly [4, 1000000, 0]
  • metric tons: readonly [4, 1000000, 0]
  • mi: readonly [3, 1609.344, 0]
  • mi3: readonly [8, 4200, 0]
  • mile: readonly [3, 1609.344, 0]
  • miles: readonly [3, 1609.344, 0]
  • millennia: readonly [7, 31556952000, 0]
  • millennium: readonly [7, 31556952000, 0]
  • milliday: readonly [7, 86.4, 0]
  • millidays: readonly [7, 86.4, 0]
  • millitorr: readonly [5, 0.13332236842105263, 0]
  • min: readonly [7, 60, 0]
  • minute: readonly [7, 60, 0]
  • minutes: readonly [7, 60, 0]
  • mi³: readonly [8, 4200, 0]
  • mo: readonly [7, 2592000, 0]
  • moment: readonly [7, 90, 0]
  • moments: readonly [7, 90, 0]
  • month: readonly [7, 2592000, 0]
  • months: readonly [7, 2592000, 0]
  • : readonly [8, 1, 0]
  • nautical mile: readonly [3, 1852, 0]
  • nautical miles: readonly [3, 1852, 0]
  • newton: readonly [2, 1, 0]
  • newtons: readonly [2, 1, 0]
  • nibble: readonly [1, 4, 0]
  • nibbles: readonly [1, 4, 0]
  • nmi: readonly [3, 1852, 0]
  • octad: readonly [1, 8, 0]
  • octade: readonly [1, 8, 0]
  • octades: readonly [1, 8, 0]
  • octads: readonly [1, 8, 0]
  • octect: readonly [1, 8, 0]
  • octects: readonly [1, 8, 0]
  • oilbbl: readonly [8, 0.15898756717224713, 0]
  • ounce: readonly [4, 28.349523125, 0]
  • ounces: readonly [4, 28.349523125, 0]
  • oz: readonly [4, 28.349523125, 0]
  • pascal: readonly [5, 1, 0]
  • pascals: readonly [5, 1, 0]
  • pdl: readonly [2, 0.138255, 0]
  • pentad: readonly [1, 5, 0]
  • pentads: readonly [1, 5, 0]
  • pk: readonly [8, 0.00909218, 0]
  • pound: readonly [4, 453.59237, 0]
  • pound of force: readonly [2, 4.448222, 0]
  • pound-force: readonly [2, 4.448222, 0]
  • poundal: readonly [2, 0.138255, 0]
  • poundals: readonly [2, 0.138255, 0]
  • pounds: readonly [4, 453.59237, 0]
  • quadbit: readonly [1, 4, 0]
  • quadbits: readonly [1, 4, 0]
  • quartet: readonly [1, 4, 0]
  • quartets: readonly [1, 4, 0]
  • r: readonly [0, 1, 0]
  • rad: readonly [0, 1, 0]
  • radian: readonly [0, 1, 0]
  • radians: readonly [0, 1, 0]
  • rads: readonly [0, 1, 0]
  • rankine: readonly [6, 0.5555555555555556, 0]
  • s: readonly [7, 1, 0]
  • second: readonly [7, 1, 0]
  • seconds: readonly [7, 1, 0]
  • semioctet: readonly [1, 4, 0]
  • semioctets: readonly [1, 4, 0]
  • sextet: readonly [1, 6, 0]
  • sextets: readonly [1, 6, 0]
  • shake: readonly [7, 1e-8, 0]
  • shakes: readonly [7, 1e-8, 0]
  • short ton: readonly [4, 907184.74, 0]
  • short tons: readonly [4, 907184.74, 0]
  • slab: readonly [1, 12, 0]
  • slabs: readonly [1, 12, 0]
  • st: readonly [4, 6350.293180000001, 0]
  • stere: readonly [8, 1, 0]
  • steres: readonly [8, 1, 0]
  • stone: readonly [4, 6350.293180000001, 0]
  • stones: readonly [4, 6350.293180000001, 0]
  • svedberg: readonly [7, 1e-13, 0]
  • svedbergs: readonly [7, 1e-13, 0]
  • t: readonly [4, 1000000, 0]
  • tablespoon: readonly [8, 0.000014786764781249999, 0]
  • tablespoons: readonly [8, 0.000014786764781249999, 0]
  • tbsp: readonly [8, 0.000014786764781249999, 0]
  • teaspoon: readonly [8, 0.0000049289215937500005, 0]
  • teaspoons: readonly [8, 0.0000049289215937500005, 0]
  • tetrad: readonly [1, 4, 0]
  • tetrade: readonly [1, 4, 0]
  • tetrades: readonly [1, 4, 0]
  • tetrads: readonly [1, 4, 0]
  • time unit: readonly [7, 0.001024, 0]
  • tonne: readonly [4, 1000000, 0]
  • tonnes: readonly [4, 1000000, 0]
  • torr: readonly [5, 133.32236842105263, 0]
  • torrs: readonly [5, 133.32236842105263, 0]
  • triad: readonly [1, 3, 0]
  • triade: readonly [1, 3, 0]
  • triades: readonly [1, 3, 0]
  • triads: readonly [1, 3, 0]
  • tribit: readonly [1, 3, 0]
  • tribits: readonly [1, 3, 0]
  • tsp: readonly [8, 0.0000049289215937500005, 0]
  • turn: readonly [0, 6.283185307179586, 0]
  • turns: readonly [0, 6.283185307179586, 0]
  • unibit: readonly [1, 1, 0]
  • unibits: readonly [1, 1, 0]
  • us ton: readonly [4, 907184.74, 0]
  • us tons: readonly [4, 907184.74, 0]
  • week: readonly [7, 604800, 0]
  • weeks: readonly [7, 604800, 0]
  • wk: readonly [7, 604800, 0]
  • y: readonly [7, 31536000, 0]
  • yard: readonly [3, 0.9144, 0]
  • yards: readonly [3, 0.9144, 0]
  • yd: readonly [3, 0.9144, 0]
  • yd3: readonly [8, 0.76, 0]
  • yd³: readonly [8, 0.76, 0]
  • year: readonly [7, 31536000, 0]
  • years: readonly [7, 31536000, 0]
  • yr: readonly [7, 31536000, 0]
  • °: readonly [0, 0.017453292519943295, 0]
  • : readonly [4, 28.349523125, 0]

Functions

convert

  • convert<Q>(angle: Q, from: Angle): Converter<Q, Angle>
  • convert<Q>(quantity: Q, from: Data): Converter<Q, Data>
  • convert<Q>(quantity: Q, from: Force): Converter<Q, Force>
  • convert<Q>(length: Q, from: Length): Converter<Q, Length>
  • convert<Q>(quantity: Q, from: Mass): Converter<Q, Mass>
  • convert<Q>(quantity: Q, from: Pressure): Converter<Q, Pressure>
  • convert<Q>(quantity: Q, from: Temperature): Converter<Q, Temperature>
  • convert<Q>(duration: Q, from: Time): Converter<Q, Time>
  • convert<Q>(quantity: Q, from: Volume): Converter<Q, Volume>
  • Convert a given angle into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • angle: Q

      The angle you want to convert

    • from: Angle

      The angle type you are converting from

    Returns Converter<Q, Angle>

    An object you can use to convert the provided quantity

  • Convert a given quantity of data into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of data you want to convert

    • from: Data

      The unit of data you are converting from

    Returns Converter<Q, Data>

    An object you can use to convert the provided quantity

  • Convert a given quantity of force into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of force you want to convert

    • from: Force

      The unit of force you are converting from

    Returns Converter<Q, Force>

    An object you can use to convert the provided quantity

  • Convert a given length into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • length: Q

      The length you want to convert

    • from: Length

      The unit of length you are converting from

    Returns Converter<Q, Length>

    An object you can use to convert the provided quantity

  • Convert a given quantity of mass into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of mass you want to convert

    • from: Mass

      The unit of mass you are converting from

    Returns Converter<Q, Mass>

    An object you can use to convert the provided quantity

  • Convert a given quantity of pressure into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of pressure you want to convert

    • from: Pressure

      The unit of pressure you are converting from

    Returns Converter<Q, Pressure>

    An object you can use to convert the provided quantity

  • Convert a given temperature into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of temperature you want to convert

    • from: Temperature

      The unit of temperature are converting from

    Returns Converter<Q, Temperature>

    An object you can use to convert the provided quantity

  • Convert a given duration of time into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • duration: Q

      The duration of time you want to convert

    • from: Time

      The unit of time you are converting from

    Returns Converter<Q, Time>

    An object you can use to convert the provided quantity

  • Convert a given quantity of volume into another unit.

    throws

    RangeError If the from parameter is not a recognized unit

    Type parameters

    • Q: number | bigint

    Parameters

    • quantity: Q

      The quantity of volume you want to convert

    • from: Volume

      The unit of volume you are converting from

    Returns Converter<Q, Volume>

    An object you can use to convert the provided quantity

convertMany

  • convertMany(value: string): Converter<number, Unit>
  • Convert several values in a string into a single unit.

    example
    convertMany('1d 12h').to('hours') === 36;
    

    Parameters

    • value: string

      The string to parse as values

    Returns Converter<number, Unit>

ms

  • ms(value: string): number
  • Convert a duration string to a duration in milliseconds.

    You can use this function as a replacement for the duration string to millisecond duration number that the popular ms package provides.

    If you really care about performance you should just use convertMany directly.

    example
    ms('1d 2h 30min') === 95400000;
    
    throws

    If the provided value was invalid

    Parameters

    • value: string

      Duration string to convert

    Returns number

    A duration in milliseconds

Generated using TypeDoc