|
|
|
@ -34,7 +34,7 @@ import {
|
|
|
|
|
booleanValueFormatter,
|
|
|
|
|
} from './valueFormats';
|
|
|
|
|
|
|
|
|
|
export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
export const getCategories = (): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Misc',
|
|
|
|
|
formats: [
|
|
|
|
@ -88,14 +88,14 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Computation',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'FLOP/s', id: 'flops', fn: SIPrefix('FLOPS', 0, scalable) },
|
|
|
|
|
{ name: 'MFLOP/s', id: 'mflops', fn: SIPrefix('FLOPS', 2, scalable) },
|
|
|
|
|
{ name: 'GFLOP/s', id: 'gflops', fn: SIPrefix('FLOPS', 3, scalable) },
|
|
|
|
|
{ name: 'TFLOP/s', id: 'tflops', fn: SIPrefix('FLOPS', 4, scalable) },
|
|
|
|
|
{ name: 'PFLOP/s', id: 'pflops', fn: SIPrefix('FLOPS', 5, scalable) },
|
|
|
|
|
{ name: 'EFLOP/s', id: 'eflops', fn: SIPrefix('FLOPS', 6, scalable) },
|
|
|
|
|
{ name: 'ZFLOP/s', id: 'zflops', fn: SIPrefix('FLOPS', 7, scalable) },
|
|
|
|
|
{ name: 'YFLOP/s', id: 'yflops', fn: SIPrefix('FLOPS', 8, scalable) },
|
|
|
|
|
{ name: 'FLOP/s', id: 'flops', fn: SIPrefix('FLOPS') },
|
|
|
|
|
{ name: 'MFLOP/s', id: 'mflops', fn: SIPrefix('FLOPS', 2) },
|
|
|
|
|
{ name: 'GFLOP/s', id: 'gflops', fn: SIPrefix('FLOPS', 3) },
|
|
|
|
|
{ name: 'TFLOP/s', id: 'tflops', fn: SIPrefix('FLOPS', 4) },
|
|
|
|
|
{ name: 'PFLOP/s', id: 'pflops', fn: SIPrefix('FLOPS', 5) },
|
|
|
|
|
{ name: 'EFLOP/s', id: 'eflops', fn: SIPrefix('FLOPS', 6) },
|
|
|
|
|
{ name: 'ZFLOP/s', id: 'zflops', fn: SIPrefix('FLOPS', 7) },
|
|
|
|
|
{ name: 'YFLOP/s', id: 'yflops', fn: SIPrefix('FLOPS', 8) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -152,49 +152,49 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
name: 'Data',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'bytes(IEC)', id: 'bytes', fn: binaryPrefix('B') },
|
|
|
|
|
{ name: 'bytes(SI)', id: 'decbytes', fn: SIPrefix('B', 0, scalable) },
|
|
|
|
|
{ name: 'bytes(SI)', id: 'decbytes', fn: SIPrefix('B') },
|
|
|
|
|
{ name: 'bits(IEC)', id: 'bits', fn: binaryPrefix('b') },
|
|
|
|
|
{ name: 'bits(SI)', id: 'decbits', fn: SIPrefix('b', 0, scalable) },
|
|
|
|
|
{ name: 'bits(SI)', id: 'decbits', fn: SIPrefix('b') },
|
|
|
|
|
{ name: 'kibibytes', id: 'kbytes', fn: binaryPrefix('B', 1) },
|
|
|
|
|
{ name: 'kilobytes', id: 'deckbytes', fn: SIPrefix('B', 1, scalable) },
|
|
|
|
|
{ name: 'kilobytes', id: 'deckbytes', fn: SIPrefix('B', 1) },
|
|
|
|
|
{ name: 'mebibytes', id: 'mbytes', fn: binaryPrefix('B', 2) },
|
|
|
|
|
{ name: 'megabytes', id: 'decmbytes', fn: SIPrefix('B', 2, scalable) },
|
|
|
|
|
{ name: 'megabytes', id: 'decmbytes', fn: SIPrefix('B', 2) },
|
|
|
|
|
{ name: 'gibibytes', id: 'gbytes', fn: binaryPrefix('B', 3) },
|
|
|
|
|
{ name: 'gigabytes', id: 'decgbytes', fn: SIPrefix('B', 3, scalable) },
|
|
|
|
|
{ name: 'gigabytes', id: 'decgbytes', fn: SIPrefix('B', 3) },
|
|
|
|
|
{ name: 'tebibytes', id: 'tbytes', fn: binaryPrefix('B', 4) },
|
|
|
|
|
{ name: 'terabytes', id: 'dectbytes', fn: SIPrefix('B', 4, scalable) },
|
|
|
|
|
{ name: 'terabytes', id: 'dectbytes', fn: SIPrefix('B', 4) },
|
|
|
|
|
{ name: 'pebibytes', id: 'pbytes', fn: binaryPrefix('B', 5) },
|
|
|
|
|
{ name: 'petabytes', id: 'decpbytes', fn: SIPrefix('B', 5, scalable) },
|
|
|
|
|
{ name: 'petabytes', id: 'decpbytes', fn: SIPrefix('B', 5) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Data rate',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'packets/sec', id: 'pps', fn: SIPrefix('p/s', 0, scalable) },
|
|
|
|
|
{ name: 'packets/sec', id: 'pps', fn: SIPrefix('p/s') },
|
|
|
|
|
{ name: 'bytes/sec(IEC)', id: 'binBps', fn: binaryPrefix('B/s') },
|
|
|
|
|
{ name: 'bytes/sec(SI)', id: 'Bps', fn: SIPrefix('B/s', 0, scalable) },
|
|
|
|
|
{ name: 'bytes/sec(SI)', id: 'Bps', fn: SIPrefix('B/s') },
|
|
|
|
|
{ name: 'bits/sec(IEC)', id: 'binbps', fn: binaryPrefix('b/s') },
|
|
|
|
|
{ name: 'bits/sec(SI)', id: 'bps', fn: SIPrefix('b/s', 0, scalable) },
|
|
|
|
|
{ name: 'bits/sec(SI)', id: 'bps', fn: SIPrefix('b/s') },
|
|
|
|
|
{ name: 'kibibytes/sec', id: 'KiBs', fn: binaryPrefix('B/s', 1) },
|
|
|
|
|
{ name: 'kibibits/sec', id: 'Kibits', fn: binaryPrefix('b/s', 1) },
|
|
|
|
|
{ name: 'kilobytes/sec', id: 'KBs', fn: SIPrefix('B/s', 1, scalable) },
|
|
|
|
|
{ name: 'kilobits/sec', id: 'Kbits', fn: SIPrefix('b/s', 1, scalable) },
|
|
|
|
|
{ name: 'kilobytes/sec', id: 'KBs', fn: SIPrefix('B/s', 1) },
|
|
|
|
|
{ name: 'kilobits/sec', id: 'Kbits', fn: SIPrefix('b/s', 1) },
|
|
|
|
|
{ name: 'mebibytes/sec', id: 'MiBs', fn: binaryPrefix('B/s', 2) },
|
|
|
|
|
{ name: 'mebibits/sec', id: 'Mibits', fn: binaryPrefix('b/s', 2) },
|
|
|
|
|
{ name: 'megabytes/sec', id: 'MBs', fn: SIPrefix('B/s', 2, scalable) },
|
|
|
|
|
{ name: 'megabits/sec', id: 'Mbits', fn: SIPrefix('b/s', 2, scalable) },
|
|
|
|
|
{ name: 'megabytes/sec', id: 'MBs', fn: SIPrefix('B/s', 2) },
|
|
|
|
|
{ name: 'megabits/sec', id: 'Mbits', fn: SIPrefix('b/s', 2) },
|
|
|
|
|
{ name: 'gibibytes/sec', id: 'GiBs', fn: binaryPrefix('B/s', 3) },
|
|
|
|
|
{ name: 'gibibits/sec', id: 'Gibits', fn: binaryPrefix('b/s', 3) },
|
|
|
|
|
{ name: 'gigabytes/sec', id: 'GBs', fn: SIPrefix('B/s', 3, scalable) },
|
|
|
|
|
{ name: 'gigabits/sec', id: 'Gbits', fn: SIPrefix('b/s', 3, scalable) },
|
|
|
|
|
{ name: 'gigabytes/sec', id: 'GBs', fn: SIPrefix('B/s', 3) },
|
|
|
|
|
{ name: 'gigabits/sec', id: 'Gbits', fn: SIPrefix('b/s', 3) },
|
|
|
|
|
{ name: 'tebibytes/sec', id: 'TiBs', fn: binaryPrefix('B/s', 4) },
|
|
|
|
|
{ name: 'tebibits/sec', id: 'Tibits', fn: binaryPrefix('b/s', 4) },
|
|
|
|
|
{ name: 'terabytes/sec', id: 'TBs', fn: SIPrefix('B/s', 4, scalable) },
|
|
|
|
|
{ name: 'terabits/sec', id: 'Tbits', fn: SIPrefix('b/s', 4, scalable) },
|
|
|
|
|
{ name: 'terabytes/sec', id: 'TBs', fn: SIPrefix('B/s', 4) },
|
|
|
|
|
{ name: 'terabits/sec', id: 'Tbits', fn: SIPrefix('b/s', 4) },
|
|
|
|
|
{ name: 'pebibytes/sec', id: 'PiBs', fn: binaryPrefix('B/s', 5) },
|
|
|
|
|
{ name: 'pebibits/sec', id: 'Pibits', fn: binaryPrefix('b/s', 5) },
|
|
|
|
|
{ name: 'petabytes/sec', id: 'PBs', fn: SIPrefix('B/s', 5, scalable) },
|
|
|
|
|
{ name: 'petabits/sec', id: 'Pbits', fn: SIPrefix('b/s', 5, scalable) },
|
|
|
|
|
{ name: 'petabytes/sec', id: 'PBs', fn: SIPrefix('B/s', 5) },
|
|
|
|
|
{ name: 'petabits/sec', id: 'Pbits', fn: SIPrefix('b/s', 5) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -217,46 +217,46 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Energy',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Watt (W)', id: 'watt', fn: SIPrefix('W', 0, scalable) },
|
|
|
|
|
{ name: 'Kilowatt (kW)', id: 'kwatt', fn: SIPrefix('W', 1, scalable) },
|
|
|
|
|
{ name: 'Megawatt (MW)', id: 'megwatt', fn: SIPrefix('W', 2, scalable) },
|
|
|
|
|
{ name: 'Gigawatt (GW)', id: 'gwatt', fn: SIPrefix('W', 3, scalable) },
|
|
|
|
|
{ name: 'Milliwatt (mW)', id: 'mwatt', fn: SIPrefix('W', -1, scalable) },
|
|
|
|
|
{ name: 'Watt (W)', id: 'watt', fn: SIPrefix('W') },
|
|
|
|
|
{ name: 'Kilowatt (kW)', id: 'kwatt', fn: SIPrefix('W', 1) },
|
|
|
|
|
{ name: 'Megawatt (MW)', id: 'megwatt', fn: SIPrefix('W', 2) },
|
|
|
|
|
{ name: 'Gigawatt (GW)', id: 'gwatt', fn: SIPrefix('W', 3) },
|
|
|
|
|
{ name: 'Milliwatt (mW)', id: 'mwatt', fn: SIPrefix('W', -1) },
|
|
|
|
|
{ name: 'Watt per square meter (W/m²)', id: 'Wm2', fn: toFixedUnit('W/m²') },
|
|
|
|
|
{ name: 'Volt-Ampere (VA)', id: 'voltamp', fn: SIPrefix('VA', 0, scalable) },
|
|
|
|
|
{ name: 'Kilovolt-Ampere (kVA)', id: 'kvoltamp', fn: SIPrefix('VA', 1, scalable) },
|
|
|
|
|
{ name: 'Volt-Ampere reactive (VAr)', id: 'voltampreact', fn: SIPrefix('VAr', 0, scalable) },
|
|
|
|
|
{ name: 'Kilovolt-Ampere reactive (kVAr)', id: 'kvoltampreact', fn: SIPrefix('VAr', 1, scalable) },
|
|
|
|
|
{ name: 'Watt-hour (Wh)', id: 'watth', fn: SIPrefix('Wh', 0, scalable) },
|
|
|
|
|
{ name: 'Watt-hour per Kilogram (Wh/kg)', id: 'watthperkg', fn: SIPrefix('Wh/kg', 0, scalable) },
|
|
|
|
|
{ name: 'Kilowatt-hour (kWh)', id: 'kwatth', fn: SIPrefix('Wh', 1, scalable) },
|
|
|
|
|
{ name: 'Kilowatt-min (kWm)', id: 'kwattm', fn: SIPrefix('W-Min', 1, scalable) },
|
|
|
|
|
{ name: 'Megawatt-hour (MWh)', id: 'mwatth', fn: SIPrefix('Wh', 2, scalable) },
|
|
|
|
|
{ name: 'Ampere-hour (Ah)', id: 'amph', fn: SIPrefix('Ah', 0, scalable) },
|
|
|
|
|
{ name: 'Kiloampere-hour (kAh)', id: 'kamph', fn: SIPrefix('Ah', 1, scalable) },
|
|
|
|
|
{ name: 'Milliampere-hour (mAh)', id: 'mamph', fn: SIPrefix('Ah', -1, scalable) },
|
|
|
|
|
{ name: 'Joule (J)', id: 'joule', fn: SIPrefix('J', 0, scalable) },
|
|
|
|
|
{ name: 'Electron volt (eV)', id: 'ev', fn: SIPrefix('eV', 0, scalable) },
|
|
|
|
|
{ name: 'Ampere (A)', id: 'amp', fn: SIPrefix('A', 0, scalable) },
|
|
|
|
|
{ name: 'Kiloampere (kA)', id: 'kamp', fn: SIPrefix('A', 1, scalable) },
|
|
|
|
|
{ name: 'Milliampere (mA)', id: 'mamp', fn: SIPrefix('A', -1, scalable) },
|
|
|
|
|
{ name: 'Volt (V)', id: 'volt', fn: SIPrefix('V', 0, scalable) },
|
|
|
|
|
{ name: 'Kilovolt (kV)', id: 'kvolt', fn: SIPrefix('V', 1, scalable) },
|
|
|
|
|
{ name: 'Millivolt (mV)', id: 'mvolt', fn: SIPrefix('V', -1, scalable) },
|
|
|
|
|
{ name: 'Decibel-milliwatt (dBm)', id: 'dBm', fn: SIPrefix('dBm', 0, scalable) },
|
|
|
|
|
{ name: 'Milliohm (mΩ)', id: 'mohm', fn: SIPrefix('Ω', -1, scalable) },
|
|
|
|
|
{ name: 'Ohm (Ω)', id: 'ohm', fn: SIPrefix('Ω', 0, scalable) },
|
|
|
|
|
{ name: 'Kiloohm (kΩ)', id: 'kohm', fn: SIPrefix('Ω', 1, scalable) },
|
|
|
|
|
{ name: 'Megaohm (MΩ)', id: 'Mohm', fn: SIPrefix('Ω', 2, scalable) },
|
|
|
|
|
{ name: 'Farad (F)', id: 'farad', fn: SIPrefix('F', 0, scalable) },
|
|
|
|
|
{ name: 'Microfarad (µF)', id: 'µfarad', fn: SIPrefix('F', -2, scalable) },
|
|
|
|
|
{ name: 'Nanofarad (nF)', id: 'nfarad', fn: SIPrefix('F', -3, scalable) },
|
|
|
|
|
{ name: 'Picofarad (pF)', id: 'pfarad', fn: SIPrefix('F', -4, scalable) },
|
|
|
|
|
{ name: 'Femtofarad (fF)', id: 'ffarad', fn: SIPrefix('F', -5, scalable) },
|
|
|
|
|
{ name: 'Henry (H)', id: 'henry', fn: SIPrefix('H', 0, scalable) },
|
|
|
|
|
{ name: 'Millihenry (mH)', id: 'mhenry', fn: SIPrefix('H', -1, scalable) },
|
|
|
|
|
{ name: 'Microhenry (µH)', id: 'µhenry', fn: SIPrefix('H', -2, scalable) },
|
|
|
|
|
{ name: 'Lumens (Lm)', id: 'lumens', fn: SIPrefix('Lm', 0, scalable) },
|
|
|
|
|
{ name: 'Volt-Ampere (VA)', id: 'voltamp', fn: SIPrefix('VA') },
|
|
|
|
|
{ name: 'Kilovolt-Ampere (kVA)', id: 'kvoltamp', fn: SIPrefix('VA', 1) },
|
|
|
|
|
{ name: 'Volt-Ampere reactive (VAr)', id: 'voltampreact', fn: SIPrefix('VAr') },
|
|
|
|
|
{ name: 'Kilovolt-Ampere reactive (kVAr)', id: 'kvoltampreact', fn: SIPrefix('VAr', 1) },
|
|
|
|
|
{ name: 'Watt-hour (Wh)', id: 'watth', fn: SIPrefix('Wh') },
|
|
|
|
|
{ name: 'Watt-hour per Kilogram (Wh/kg)', id: 'watthperkg', fn: SIPrefix('Wh/kg') },
|
|
|
|
|
{ name: 'Kilowatt-hour (kWh)', id: 'kwatth', fn: SIPrefix('Wh', 1) },
|
|
|
|
|
{ name: 'Kilowatt-min (kWm)', id: 'kwattm', fn: SIPrefix('W-Min', 1) },
|
|
|
|
|
{ name: 'Megawatt-hour (MWh)', id: 'mwatth', fn: SIPrefix('Wh', 2) },
|
|
|
|
|
{ name: 'Ampere-hour (Ah)', id: 'amph', fn: SIPrefix('Ah') },
|
|
|
|
|
{ name: 'Kiloampere-hour (kAh)', id: 'kamph', fn: SIPrefix('Ah', 1) },
|
|
|
|
|
{ name: 'Milliampere-hour (mAh)', id: 'mamph', fn: SIPrefix('Ah', -1) },
|
|
|
|
|
{ name: 'Joule (J)', id: 'joule', fn: SIPrefix('J') },
|
|
|
|
|
{ name: 'Electron volt (eV)', id: 'ev', fn: SIPrefix('eV') },
|
|
|
|
|
{ name: 'Ampere (A)', id: 'amp', fn: SIPrefix('A') },
|
|
|
|
|
{ name: 'Kiloampere (kA)', id: 'kamp', fn: SIPrefix('A', 1) },
|
|
|
|
|
{ name: 'Milliampere (mA)', id: 'mamp', fn: SIPrefix('A', -1) },
|
|
|
|
|
{ name: 'Volt (V)', id: 'volt', fn: SIPrefix('V') },
|
|
|
|
|
{ name: 'Kilovolt (kV)', id: 'kvolt', fn: SIPrefix('V', 1) },
|
|
|
|
|
{ name: 'Millivolt (mV)', id: 'mvolt', fn: SIPrefix('V', -1) },
|
|
|
|
|
{ name: 'Decibel-milliwatt (dBm)', id: 'dBm', fn: SIPrefix('dBm') },
|
|
|
|
|
{ name: 'Milliohm (mΩ)', id: 'mohm', fn: SIPrefix('Ω', -1) },
|
|
|
|
|
{ name: 'Ohm (Ω)', id: 'ohm', fn: SIPrefix('Ω') },
|
|
|
|
|
{ name: 'Kiloohm (kΩ)', id: 'kohm', fn: SIPrefix('Ω', 1) },
|
|
|
|
|
{ name: 'Megaohm (MΩ)', id: 'Mohm', fn: SIPrefix('Ω', 2) },
|
|
|
|
|
{ name: 'Farad (F)', id: 'farad', fn: SIPrefix('F') },
|
|
|
|
|
{ name: 'Microfarad (µF)', id: 'µfarad', fn: SIPrefix('F', -2) },
|
|
|
|
|
{ name: 'Nanofarad (nF)', id: 'nfarad', fn: SIPrefix('F', -3) },
|
|
|
|
|
{ name: 'Picofarad (pF)', id: 'pfarad', fn: SIPrefix('F', -4) },
|
|
|
|
|
{ name: 'Femtofarad (fF)', id: 'ffarad', fn: SIPrefix('F', -5) },
|
|
|
|
|
{ name: 'Henry (H)', id: 'henry', fn: SIPrefix('H') },
|
|
|
|
|
{ name: 'Millihenry (mH)', id: 'mhenry', fn: SIPrefix('H', -1) },
|
|
|
|
|
{ name: 'Microhenry (µH)', id: 'µhenry', fn: SIPrefix('H', -2) },
|
|
|
|
|
{ name: 'Lumens (Lm)', id: 'lumens', fn: SIPrefix('Lm') },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -275,52 +275,52 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Force',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Newton-meters (Nm)', id: 'forceNm', fn: SIPrefix('Nm', 0, scalable) },
|
|
|
|
|
{ name: 'Kilonewton-meters (kNm)', id: 'forcekNm', fn: SIPrefix('Nm', 1, scalable) },
|
|
|
|
|
{ name: 'Newtons (N)', id: 'forceN', fn: SIPrefix('N', 0, scalable) },
|
|
|
|
|
{ name: 'Kilonewtons (kN)', id: 'forcekN', fn: SIPrefix('N', 1, scalable) },
|
|
|
|
|
{ name: 'Newton-meters (Nm)', id: 'forceNm', fn: SIPrefix('Nm') },
|
|
|
|
|
{ name: 'Kilonewton-meters (kNm)', id: 'forcekNm', fn: SIPrefix('Nm', 1) },
|
|
|
|
|
{ name: 'Newtons (N)', id: 'forceN', fn: SIPrefix('N') },
|
|
|
|
|
{ name: 'Kilonewtons (kN)', id: 'forcekN', fn: SIPrefix('N', 1) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Hash rate',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'hashes/sec', id: 'Hs', fn: SIPrefix('H/s', 0, scalable) },
|
|
|
|
|
{ name: 'kilohashes/sec', id: 'KHs', fn: SIPrefix('H/s', 1, scalable) },
|
|
|
|
|
{ name: 'megahashes/sec', id: 'MHs', fn: SIPrefix('H/s', 2, scalable) },
|
|
|
|
|
{ name: 'gigahashes/sec', id: 'GHs', fn: SIPrefix('H/s', 3, scalable) },
|
|
|
|
|
{ name: 'terahashes/sec', id: 'THs', fn: SIPrefix('H/s', 4, scalable) },
|
|
|
|
|
{ name: 'petahashes/sec', id: 'PHs', fn: SIPrefix('H/s', 5, scalable) },
|
|
|
|
|
{ name: 'exahashes/sec', id: 'EHs', fn: SIPrefix('H/s', 6, scalable) },
|
|
|
|
|
{ name: 'hashes/sec', id: 'Hs', fn: SIPrefix('H/s') },
|
|
|
|
|
{ name: 'kilohashes/sec', id: 'KHs', fn: SIPrefix('H/s', 1) },
|
|
|
|
|
{ name: 'megahashes/sec', id: 'MHs', fn: SIPrefix('H/s', 2) },
|
|
|
|
|
{ name: 'gigahashes/sec', id: 'GHs', fn: SIPrefix('H/s', 3) },
|
|
|
|
|
{ name: 'terahashes/sec', id: 'THs', fn: SIPrefix('H/s', 4) },
|
|
|
|
|
{ name: 'petahashes/sec', id: 'PHs', fn: SIPrefix('H/s', 5) },
|
|
|
|
|
{ name: 'exahashes/sec', id: 'EHs', fn: SIPrefix('H/s', 6) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Mass',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'milligram (mg)', id: 'massmg', fn: SIPrefix('g', -1, scalable) },
|
|
|
|
|
{ name: 'gram (g)', id: 'massg', fn: SIPrefix('g', 0, scalable) },
|
|
|
|
|
{ name: 'milligram (mg)', id: 'massmg', fn: SIPrefix('g', -1) },
|
|
|
|
|
{ name: 'gram (g)', id: 'massg', fn: SIPrefix('g') },
|
|
|
|
|
{ name: 'pound (lb)', id: 'masslb', fn: toFixedUnit('lb') },
|
|
|
|
|
{ name: 'kilogram (kg)', id: 'masskg', fn: SIPrefix('g', 1, scalable) },
|
|
|
|
|
{ name: 'kilogram (kg)', id: 'masskg', fn: SIPrefix('g', 1) },
|
|
|
|
|
{ name: 'metric ton (t)', id: 'masst', fn: toFixedUnit('t') },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Length',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'millimeter (mm)', id: 'lengthmm', fn: SIPrefix('m', -1, scalable) },
|
|
|
|
|
{ name: 'millimeter (mm)', id: 'lengthmm', fn: SIPrefix('m', -1) },
|
|
|
|
|
{ name: 'inch (in)', id: 'lengthin', fn: toFixedUnit('in') },
|
|
|
|
|
{ name: 'feet (ft)', id: 'lengthft', fn: toFixedUnit('ft') },
|
|
|
|
|
{ name: 'meter (m)', id: 'lengthm', fn: SIPrefix('m', 0, scalable) },
|
|
|
|
|
{ name: 'kilometer (km)', id: 'lengthkm', fn: SIPrefix('m', 1, scalable) },
|
|
|
|
|
{ name: 'meter (m)', id: 'lengthm', fn: SIPrefix('m') },
|
|
|
|
|
{ name: 'kilometer (km)', id: 'lengthkm', fn: SIPrefix('m', 1) },
|
|
|
|
|
{ name: 'mile (mi)', id: 'lengthmi', fn: toFixedUnit('mi') },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Pressure',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Millibars', id: 'pressurembar', fn: SIPrefix('bar', -1, scalable) },
|
|
|
|
|
{ name: 'Bars', id: 'pressurebar', fn: SIPrefix('bar', 0, scalable) },
|
|
|
|
|
{ name: 'Kilobars', id: 'pressurekbar', fn: SIPrefix('bar', 1, scalable) },
|
|
|
|
|
{ name: 'Pascals', id: 'pressurepa', fn: SIPrefix('Pa', 0, scalable) },
|
|
|
|
|
{ name: 'Millibars', id: 'pressurembar', fn: SIPrefix('bar', -1) },
|
|
|
|
|
{ name: 'Bars', id: 'pressurebar', fn: SIPrefix('bar') },
|
|
|
|
|
{ name: 'Kilobars', id: 'pressurekbar', fn: SIPrefix('bar', 1) },
|
|
|
|
|
{ name: 'Pascals', id: 'pressurepa', fn: SIPrefix('Pa') },
|
|
|
|
|
{ name: 'Hectopascals', id: 'pressurehpa', fn: toFixedUnit('hPa') },
|
|
|
|
|
{ name: 'Kilopascals', id: 'pressurekpa', fn: toFixedUnit('kPa') },
|
|
|
|
|
{ name: 'Inches of mercury', id: 'pressurehg', fn: toFixedUnit('"Hg') },
|
|
|
|
@ -330,29 +330,29 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Radiation',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Becquerel (Bq)', id: 'radbq', fn: SIPrefix('Bq', 0, scalable) },
|
|
|
|
|
{ name: 'curie (Ci)', id: 'radci', fn: SIPrefix('Ci', 0, scalable) },
|
|
|
|
|
{ name: 'Gray (Gy)', id: 'radgy', fn: SIPrefix('Gy', 0, scalable) },
|
|
|
|
|
{ name: 'rad', id: 'radrad', fn: SIPrefix('rad', 0, scalable) },
|
|
|
|
|
{ name: 'Sievert (Sv)', id: 'radsv', fn: SIPrefix('Sv', 0, scalable) },
|
|
|
|
|
{ name: 'milliSievert (mSv)', id: 'radmsv', fn: SIPrefix('Sv', -1, scalable) },
|
|
|
|
|
{ name: 'microSievert (µSv)', id: 'radusv', fn: SIPrefix('Sv', -2, scalable) },
|
|
|
|
|
{ name: 'rem', id: 'radrem', fn: SIPrefix('rem', 0, scalable) },
|
|
|
|
|
{ name: 'Exposure (C/kg)', id: 'radexpckg', fn: SIPrefix('C/kg', 0, scalable) },
|
|
|
|
|
{ name: 'roentgen (R)', id: 'radr', fn: SIPrefix('R', 0, scalable) },
|
|
|
|
|
{ name: 'Sievert/hour (Sv/h)', id: 'radsvh', fn: SIPrefix('Sv/h', 0, scalable) },
|
|
|
|
|
{ name: 'milliSievert/hour (mSv/h)', id: 'radmsvh', fn: SIPrefix('Sv/h', -1, scalable) },
|
|
|
|
|
{ name: 'microSievert/hour (µSv/h)', id: 'radusvh', fn: SIPrefix('Sv/h', -2, scalable) },
|
|
|
|
|
{ name: 'Becquerel (Bq)', id: 'radbq', fn: SIPrefix('Bq') },
|
|
|
|
|
{ name: 'curie (Ci)', id: 'radci', fn: SIPrefix('Ci') },
|
|
|
|
|
{ name: 'Gray (Gy)', id: 'radgy', fn: SIPrefix('Gy') },
|
|
|
|
|
{ name: 'rad', id: 'radrad', fn: SIPrefix('rad') },
|
|
|
|
|
{ name: 'Sievert (Sv)', id: 'radsv', fn: SIPrefix('Sv') },
|
|
|
|
|
{ name: 'milliSievert (mSv)', id: 'radmsv', fn: SIPrefix('Sv', -1) },
|
|
|
|
|
{ name: 'microSievert (µSv)', id: 'radusv', fn: SIPrefix('Sv', -2) },
|
|
|
|
|
{ name: 'rem', id: 'radrem', fn: SIPrefix('rem') },
|
|
|
|
|
{ name: 'Exposure (C/kg)', id: 'radexpckg', fn: SIPrefix('C/kg') },
|
|
|
|
|
{ name: 'roentgen (R)', id: 'radr', fn: SIPrefix('R') },
|
|
|
|
|
{ name: 'Sievert/hour (Sv/h)', id: 'radsvh', fn: SIPrefix('Sv/h') },
|
|
|
|
|
{ name: 'milliSievert/hour (mSv/h)', id: 'radmsvh', fn: SIPrefix('Sv/h', -1) },
|
|
|
|
|
{ name: 'microSievert/hour (µSv/h)', id: 'radusvh', fn: SIPrefix('Sv/h', -2) },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Rotational Speed',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Revolutions per minute (rpm)', id: 'rotrpm', fn: toFixedUnit('rpm') },
|
|
|
|
|
{ name: 'Hertz (Hz)', id: 'rothz', fn: SIPrefix('Hz', 0, scalable) },
|
|
|
|
|
{ name: 'Kilohertz (kHz)', id: 'rotkhz', fn: SIPrefix('Hz', 1, scalable) },
|
|
|
|
|
{ name: 'Megahertz (MHz)', id: 'rotmhz', fn: SIPrefix('Hz', 2, scalable) },
|
|
|
|
|
{ name: 'Gigahertz (GHz)', id: 'rotghz', fn: SIPrefix('Hz', 3, scalable) },
|
|
|
|
|
{ name: 'Hertz (Hz)', id: 'rothz', fn: SIPrefix('Hz') },
|
|
|
|
|
{ name: 'Kilohertz (kHz)', id: 'rotkhz', fn: SIPrefix('Hz', 1) },
|
|
|
|
|
{ name: 'Megahertz (MHz)', id: 'rotmhz', fn: SIPrefix('Hz', 2) },
|
|
|
|
|
{ name: 'Gigahertz (GHz)', id: 'rotghz', fn: SIPrefix('Hz', 3) },
|
|
|
|
|
{ name: 'Radians per second (rad/s)', id: 'rotrads', fn: toFixedUnit('rad/s') },
|
|
|
|
|
{ name: 'Degrees per second (°/s)', id: 'rotdegs', fn: toFixedUnit('°/s') },
|
|
|
|
|
],
|
|
|
|
@ -368,7 +368,7 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Time',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'Hertz (1/s)', id: 'hertz', fn: SIPrefix('Hz', 0, scalable) },
|
|
|
|
|
{ name: 'Hertz (1/s)', id: 'hertz', fn: SIPrefix('Hz') },
|
|
|
|
|
{ name: 'nanoseconds (ns)', id: 'ns', fn: toNanoSeconds },
|
|
|
|
|
{ name: 'microseconds (µs)', id: 'µs', fn: toMicroSeconds },
|
|
|
|
|
{ name: 'milliseconds (ms)', id: 'ms', fn: toMilliSeconds },
|
|
|
|
@ -421,8 +421,8 @@ export const getCategories = (scalable = true): ValueFormatCategory[] => [
|
|
|
|
|
{
|
|
|
|
|
name: 'Volume',
|
|
|
|
|
formats: [
|
|
|
|
|
{ name: 'millilitre (mL)', id: 'mlitre', fn: SIPrefix('L', -1, scalable) },
|
|
|
|
|
{ name: 'litre (L)', id: 'litre', fn: SIPrefix('L', 0, scalable) },
|
|
|
|
|
{ name: 'millilitre (mL)', id: 'mlitre', fn: SIPrefix('L', -1) },
|
|
|
|
|
{ name: 'litre (L)', id: 'litre', fn: SIPrefix('L') },
|
|
|
|
|
{ name: 'cubic meter', id: 'm3', fn: toFixedUnit('m³') },
|
|
|
|
|
{ name: 'Normal cubic meter', id: 'Nm3', fn: toFixedUnit('Nm³') },
|
|
|
|
|
{ name: 'cubic decimeter', id: 'dm3', fn: toFixedUnit('dm³') },
|
|
|
|
|