mirror of
https://github.com/gchq/CyberChef
synced 2024-12-26 20:43:10 +00:00
Introduced key-spacing eslint rule
This commit is contained in:
parent
a61df0832f
commit
5f1c88104d
15 changed files with 1436 additions and 1436 deletions
|
@ -52,9 +52,9 @@
|
||||||
"no-trailing-spaces": "warn",
|
"no-trailing-spaces": "warn",
|
||||||
"eol-last": "error",
|
"eol-last": "error",
|
||||||
"func-call-spacing": "error",
|
"func-call-spacing": "error",
|
||||||
//"key-spacing": ["warn", {
|
"key-spacing": ["warn", {
|
||||||
// "mode": "minimum"
|
"mode": "minimum"
|
||||||
//}],
|
}],
|
||||||
"indent": ["error", 4, {
|
"indent": ["error", 4, {
|
||||||
"ArrayExpression": "first",
|
"ArrayExpression": "first",
|
||||||
"SwitchCase": 1
|
"SwitchCase": 1
|
||||||
|
|
|
@ -164,10 +164,10 @@ Recipe.prototype.execute = async function(dish, startFrom) {
|
||||||
if (op.isFlowControl()) {
|
if (op.isFlowControl()) {
|
||||||
// Package up the current state
|
// Package up the current state
|
||||||
let state = {
|
let state = {
|
||||||
"progress" : i,
|
"progress": i,
|
||||||
"dish" : dish,
|
"dish": dish,
|
||||||
"opList" : this.opList,
|
"opList": this.opList,
|
||||||
"numJumps" : numJumps
|
"numJumps": numJumps
|
||||||
};
|
};
|
||||||
|
|
||||||
state = await op.run(state);
|
state = await op.run(state);
|
||||||
|
|
|
@ -2292,7 +2292,7 @@ const OperationConfig = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Windows Filetime to UNIX Timestamp":{
|
"Windows Filetime to UNIX Timestamp": {
|
||||||
description: "Converts a Windows Filetime value to a UNIX timestamp.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
|
description: "Converts a Windows Filetime value to a UNIX timestamp.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
|
||||||
run: DateTime.runFromFiletimeToUnix,
|
run: DateTime.runFromFiletimeToUnix,
|
||||||
inputType: "string",
|
inputType: "string",
|
||||||
|
@ -2310,7 +2310,7 @@ const OperationConfig = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"UNIX Timestamp to Windows Filetime":{
|
"UNIX Timestamp to Windows Filetime": {
|
||||||
description: "Converts a UNIX timestamp to a Windows Filetime value.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
|
description: "Converts a UNIX timestamp to a Windows Filetime value.<br><br>A Windows Filetime is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 UTC.<br><br>A UNIX timestamp is a 32-bit value representing the number of seconds since January 1, 1970 UTC (the UNIX epoch).<br><br>This operation also supports UNIX timestamps in milliseconds, microseconds and nanoseconds.",
|
||||||
run: DateTime.runToFiletimeFromUnix,
|
run: DateTime.runToFiletimeFromUnix,
|
||||||
inputType: "string",
|
inputType: "string",
|
||||||
|
|
|
@ -329,7 +329,7 @@ const Code = {
|
||||||
* @param {Object[]} args
|
* @param {Object[]} args
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
runXpath:function(input, args) {
|
runXpath: function(input, args) {
|
||||||
let query = args[0],
|
let query = args[0],
|
||||||
delimiter = args[1];
|
delimiter = args[1];
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ const Compress = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
RAW_COMPRESSION_TYPE_LOOKUP: {
|
RAW_COMPRESSION_TYPE_LOOKUP: {
|
||||||
"Fixed Huffman Coding" : Zlib.RawDeflate.CompressionType.FIXED,
|
"Fixed Huffman Coding": Zlib.RawDeflate.CompressionType.FIXED,
|
||||||
"Dynamic Huffman Coding" : Zlib.RawDeflate.CompressionType.DYNAMIC,
|
"Dynamic Huffman Coding": Zlib.RawDeflate.CompressionType.DYNAMIC,
|
||||||
"None (Store)" : Zlib.RawDeflate.CompressionType.NONE,
|
"None (Store)": Zlib.RawDeflate.CompressionType.NONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,8 +99,8 @@ const Compress = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
RAW_BUFFER_TYPE_LOOKUP: {
|
RAW_BUFFER_TYPE_LOOKUP: {
|
||||||
"Adaptive" : Zlib.RawInflate.BufferType.ADAPTIVE,
|
"Adaptive": Zlib.RawInflate.BufferType.ADAPTIVE,
|
||||||
"Block" : Zlib.RawInflate.BufferType.BLOCK,
|
"Block": Zlib.RawInflate.BufferType.BLOCK,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,9 +150,9 @@ const Compress = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
ZLIB_COMPRESSION_TYPE_LOOKUP: {
|
ZLIB_COMPRESSION_TYPE_LOOKUP: {
|
||||||
"Fixed Huffman Coding" : Zlib.Deflate.CompressionType.FIXED,
|
"Fixed Huffman Coding": Zlib.Deflate.CompressionType.FIXED,
|
||||||
"Dynamic Huffman Coding" : Zlib.Deflate.CompressionType.DYNAMIC,
|
"Dynamic Huffman Coding": Zlib.Deflate.CompressionType.DYNAMIC,
|
||||||
"None (Store)" : Zlib.Deflate.CompressionType.NONE,
|
"None (Store)": Zlib.Deflate.CompressionType.NONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,8 +175,8 @@ const Compress = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
ZLIB_BUFFER_TYPE_LOOKUP: {
|
ZLIB_BUFFER_TYPE_LOOKUP: {
|
||||||
"Adaptive" : Zlib.Inflate.BufferType.ADAPTIVE,
|
"Adaptive": Zlib.Inflate.BufferType.ADAPTIVE,
|
||||||
"Block" : Zlib.Inflate.BufferType.BLOCK,
|
"Block": Zlib.Inflate.BufferType.BLOCK,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -264,17 +264,17 @@ const Compress = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
ZIP_COMPRESSION_METHOD_LOOKUP: {
|
ZIP_COMPRESSION_METHOD_LOOKUP: {
|
||||||
"Deflate" : Zlib.Zip.CompressionMethod.DEFLATE,
|
"Deflate": Zlib.Zip.CompressionMethod.DEFLATE,
|
||||||
"None (Store)" : Zlib.Zip.CompressionMethod.STORE
|
"None (Store)": Zlib.Zip.CompressionMethod.STORE
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
ZIP_OS_LOOKUP: {
|
ZIP_OS_LOOKUP: {
|
||||||
"MSDOS" : Zlib.Zip.OperatingSystem.MSDOS,
|
"MSDOS": Zlib.Zip.OperatingSystem.MSDOS,
|
||||||
"Unix" : Zlib.Zip.OperatingSystem.UNIX,
|
"Unix": Zlib.Zip.OperatingSystem.UNIX,
|
||||||
"Macintosh" : Zlib.Zip.OperatingSystem.MACINTOSH
|
"Macintosh": Zlib.Zip.OperatingSystem.MACINTOSH
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,36 +25,36 @@ const Convert = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
DISTANCE_FACTOR: { // Multiples of a metre
|
DISTANCE_FACTOR: { // Multiples of a metre
|
||||||
"Nanometres (nm)" : 1e-9,
|
"Nanometres (nm)": 1e-9,
|
||||||
"Micrometres (µm)" : 1e-6,
|
"Micrometres (µm)": 1e-6,
|
||||||
"Millimetres (mm)" : 1e-3,
|
"Millimetres (mm)": 1e-3,
|
||||||
"Centimetres (cm)" : 1e-2,
|
"Centimetres (cm)": 1e-2,
|
||||||
"Metres (m)" : 1,
|
"Metres (m)": 1,
|
||||||
"Kilometers (km)" : 1e3,
|
"Kilometers (km)": 1e3,
|
||||||
|
|
||||||
"Thou (th)" : 0.0000254,
|
"Thou (th)": 0.0000254,
|
||||||
"Inches (in)" : 0.0254,
|
"Inches (in)": 0.0254,
|
||||||
"Feet (ft)" : 0.3048,
|
"Feet (ft)": 0.3048,
|
||||||
"Yards (yd)" : 0.9144,
|
"Yards (yd)": 0.9144,
|
||||||
"Chains (ch)" : 20.1168,
|
"Chains (ch)": 20.1168,
|
||||||
"Furlongs (fur)" : 201.168,
|
"Furlongs (fur)": 201.168,
|
||||||
"Miles (mi)" : 1609.344,
|
"Miles (mi)": 1609.344,
|
||||||
"Leagues (lea)" : 4828.032,
|
"Leagues (lea)": 4828.032,
|
||||||
|
|
||||||
"Fathoms (ftm)" : 1.853184,
|
"Fathoms (ftm)": 1.853184,
|
||||||
"Cables" : 185.3184,
|
"Cables": 185.3184,
|
||||||
"Nautical miles" : 1853.184,
|
"Nautical miles": 1853.184,
|
||||||
|
|
||||||
"Cars (4m)" : 4,
|
"Cars (4m)": 4,
|
||||||
"Buses (8.4m)" : 8.4,
|
"Buses (8.4m)": 8.4,
|
||||||
"American football fields (91m)": 91,
|
"American football fields (91m)": 91,
|
||||||
"Football pitches (105m)": 105,
|
"Football pitches (105m)": 105,
|
||||||
|
|
||||||
"Earth-to-Moons" : 380000000,
|
"Earth-to-Moons": 380000000,
|
||||||
"Earth's equators" : 40075016.686,
|
"Earth's equators": 40075016.686,
|
||||||
"Astronomical units (au)": 149597870700,
|
"Astronomical units (au)": 149597870700,
|
||||||
"Light-years (ly)" : 9460730472580800,
|
"Light-years (ly)": 9460730472580800,
|
||||||
"Parsecs (pc)" : 3.0856776e16
|
"Parsecs (pc)": 3.0856776e16
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,52 +90,52 @@ const Convert = {
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
DATA_FACTOR: { // Multiples of a bit
|
DATA_FACTOR: { // Multiples of a bit
|
||||||
"Bits (b)" : 1,
|
"Bits (b)": 1,
|
||||||
"Nibbles" : 4,
|
"Nibbles": 4,
|
||||||
"Octets" : 8,
|
"Octets": 8,
|
||||||
"Bytes (B)" : 8,
|
"Bytes (B)": 8,
|
||||||
|
|
||||||
// Binary bits (2^n)
|
// Binary bits (2^n)
|
||||||
"Kibibits (Kib)" : 1024,
|
"Kibibits (Kib)": 1024,
|
||||||
"Mebibits (Mib)" : 1048576,
|
"Mebibits (Mib)": 1048576,
|
||||||
"Gibibits (Gib)" : 1073741824,
|
"Gibibits (Gib)": 1073741824,
|
||||||
"Tebibits (Tib)" : 1099511627776,
|
"Tebibits (Tib)": 1099511627776,
|
||||||
"Pebibits (Pib)" : 1125899906842624,
|
"Pebibits (Pib)": 1125899906842624,
|
||||||
"Exbibits (Eib)" : 1152921504606846976,
|
"Exbibits (Eib)": 1152921504606846976,
|
||||||
"Zebibits (Zib)" : 1180591620717411303424,
|
"Zebibits (Zib)": 1180591620717411303424,
|
||||||
"Yobibits (Yib)" : 1208925819614629174706176,
|
"Yobibits (Yib)": 1208925819614629174706176,
|
||||||
|
|
||||||
// Decimal bits (10^n)
|
// Decimal bits (10^n)
|
||||||
"Decabits" : 10,
|
"Decabits": 10,
|
||||||
"Hectobits" : 100,
|
"Hectobits": 100,
|
||||||
"Kilobits (Kb)" : 1e3,
|
"Kilobits (Kb)": 1e3,
|
||||||
"Megabits (Mb)" : 1e6,
|
"Megabits (Mb)": 1e6,
|
||||||
"Gigabits (Gb)" : 1e9,
|
"Gigabits (Gb)": 1e9,
|
||||||
"Terabits (Tb)" : 1e12,
|
"Terabits (Tb)": 1e12,
|
||||||
"Petabits (Pb)" : 1e15,
|
"Petabits (Pb)": 1e15,
|
||||||
"Exabits (Eb)" : 1e18,
|
"Exabits (Eb)": 1e18,
|
||||||
"Zettabits (Zb)" : 1e21,
|
"Zettabits (Zb)": 1e21,
|
||||||
"Yottabits (Yb)" : 1e24,
|
"Yottabits (Yb)": 1e24,
|
||||||
|
|
||||||
// Binary bytes (8 x 2^n)
|
// Binary bytes (8 x 2^n)
|
||||||
"Kibibytes (KiB)" : 8192,
|
"Kibibytes (KiB)": 8192,
|
||||||
"Mebibytes (MiB)" : 8388608,
|
"Mebibytes (MiB)": 8388608,
|
||||||
"Gibibytes (GiB)" : 8589934592,
|
"Gibibytes (GiB)": 8589934592,
|
||||||
"Tebibytes (TiB)" : 8796093022208,
|
"Tebibytes (TiB)": 8796093022208,
|
||||||
"Pebibytes (PiB)" : 9007199254740992,
|
"Pebibytes (PiB)": 9007199254740992,
|
||||||
"Exbibytes (EiB)" : 9223372036854775808,
|
"Exbibytes (EiB)": 9223372036854775808,
|
||||||
"Zebibytes (ZiB)" : 9444732965739290427392,
|
"Zebibytes (ZiB)": 9444732965739290427392,
|
||||||
"Yobibytes (YiB)" : 9671406556917033397649408,
|
"Yobibytes (YiB)": 9671406556917033397649408,
|
||||||
|
|
||||||
// Decimal bytes (8 x 10^n)
|
// Decimal bytes (8 x 10^n)
|
||||||
"Kilobytes (KB)" : 8e3,
|
"Kilobytes (KB)": 8e3,
|
||||||
"Megabytes (MB)" : 8e6,
|
"Megabytes (MB)": 8e6,
|
||||||
"Gigabytes (GB)" : 8e9,
|
"Gigabytes (GB)": 8e9,
|
||||||
"Terabytes (TB)" : 8e12,
|
"Terabytes (TB)": 8e12,
|
||||||
"Petabytes (PB)" : 8e15,
|
"Petabytes (PB)": 8e15,
|
||||||
"Exabytes (EB)" : 8e18,
|
"Exabytes (EB)": 8e18,
|
||||||
"Zettabytes (ZB)" : 8e21,
|
"Zettabytes (ZB)": 8e21,
|
||||||
"Yottabytes (YB)" : 8e24,
|
"Yottabytes (YB)": 8e24,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,51 +171,51 @@ const Convert = {
|
||||||
*/
|
*/
|
||||||
AREA_FACTOR: { // Multiples of a square metre
|
AREA_FACTOR: { // Multiples of a square metre
|
||||||
// Metric
|
// Metric
|
||||||
"Square metre (sq m)" : 1,
|
"Square metre (sq m)": 1,
|
||||||
"Square kilometre (sq km)" : 1e6,
|
"Square kilometre (sq km)": 1e6,
|
||||||
|
|
||||||
"Centiare (ca)" : 1,
|
"Centiare (ca)": 1,
|
||||||
"Deciare (da)" : 10,
|
"Deciare (da)": 10,
|
||||||
"Are (a)" : 100,
|
"Are (a)": 100,
|
||||||
"Decare (daa)" : 1e3,
|
"Decare (daa)": 1e3,
|
||||||
"Hectare (ha)" : 1e4,
|
"Hectare (ha)": 1e4,
|
||||||
|
|
||||||
// Imperial
|
// Imperial
|
||||||
"Square inch (sq in)" : 0.00064516,
|
"Square inch (sq in)": 0.00064516,
|
||||||
"Square foot (sq ft)" : 0.09290304,
|
"Square foot (sq ft)": 0.09290304,
|
||||||
"Square yard (sq yd)" : 0.83612736,
|
"Square yard (sq yd)": 0.83612736,
|
||||||
"Square mile (sq mi)" : 2589988.110336,
|
"Square mile (sq mi)": 2589988.110336,
|
||||||
"Perch (sq per)" : 42.21,
|
"Perch (sq per)": 42.21,
|
||||||
"Rood (ro)" : 1011,
|
"Rood (ro)": 1011,
|
||||||
"International acre (ac)" : 4046.8564224,
|
"International acre (ac)": 4046.8564224,
|
||||||
|
|
||||||
// US customary units
|
// US customary units
|
||||||
"US survey acre (ac)" : 4046.87261,
|
"US survey acre (ac)": 4046.87261,
|
||||||
"US survey square mile (sq mi)" : 2589998.470305239,
|
"US survey square mile (sq mi)": 2589998.470305239,
|
||||||
"US survey township" : 93239944.9309886,
|
"US survey township": 93239944.9309886,
|
||||||
|
|
||||||
// Nuclear physics
|
// Nuclear physics
|
||||||
"Yoctobarn (yb)" : 1e-52,
|
"Yoctobarn (yb)": 1e-52,
|
||||||
"Zeptobarn (zb)" : 1e-49,
|
"Zeptobarn (zb)": 1e-49,
|
||||||
"Attobarn (ab)" : 1e-46,
|
"Attobarn (ab)": 1e-46,
|
||||||
"Femtobarn (fb)" : 1e-43,
|
"Femtobarn (fb)": 1e-43,
|
||||||
"Picobarn (pb)" : 1e-40,
|
"Picobarn (pb)": 1e-40,
|
||||||
"Nanobarn (nb)" : 1e-37,
|
"Nanobarn (nb)": 1e-37,
|
||||||
"Microbarn (μb)" : 1e-34,
|
"Microbarn (μb)": 1e-34,
|
||||||
"Millibarn (mb)" : 1e-31,
|
"Millibarn (mb)": 1e-31,
|
||||||
"Barn (b)" : 1e-28,
|
"Barn (b)": 1e-28,
|
||||||
"Kilobarn (kb)" : 1e-25,
|
"Kilobarn (kb)": 1e-25,
|
||||||
"Megabarn (Mb)" : 1e-22,
|
"Megabarn (Mb)": 1e-22,
|
||||||
|
|
||||||
"Planck area" : 2.6e-70,
|
"Planck area": 2.6e-70,
|
||||||
"Shed" : 1e-52,
|
"Shed": 1e-52,
|
||||||
"Outhouse" : 1e-34,
|
"Outhouse": 1e-34,
|
||||||
|
|
||||||
// Comparisons
|
// Comparisons
|
||||||
"Washington D.C." : 176119191.502848,
|
"Washington D.C.": 176119191.502848,
|
||||||
"Isle of Wight" : 380000000,
|
"Isle of Wight": 380000000,
|
||||||
"Wales" : 20779000000,
|
"Wales": 20779000000,
|
||||||
"Texas" : 696241000000,
|
"Texas": 696241000000,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -252,81 +252,81 @@ const Convert = {
|
||||||
*/
|
*/
|
||||||
MASS_FACTOR: { // Multiples of a gram
|
MASS_FACTOR: { // Multiples of a gram
|
||||||
// Metric
|
// Metric
|
||||||
"Yoctogram (yg)" : 1e-24,
|
"Yoctogram (yg)": 1e-24,
|
||||||
"Zeptogram (zg)" : 1e-21,
|
"Zeptogram (zg)": 1e-21,
|
||||||
"Attogram (ag)" : 1e-18,
|
"Attogram (ag)": 1e-18,
|
||||||
"Femtogram (fg)" : 1e-15,
|
"Femtogram (fg)": 1e-15,
|
||||||
"Picogram (pg)" : 1e-12,
|
"Picogram (pg)": 1e-12,
|
||||||
"Nanogram (ng)" : 1e-9,
|
"Nanogram (ng)": 1e-9,
|
||||||
"Microgram (μg)" : 1e-6,
|
"Microgram (μg)": 1e-6,
|
||||||
"Milligram (mg)" : 1e-3,
|
"Milligram (mg)": 1e-3,
|
||||||
"Centigram (cg)" : 1e-2,
|
"Centigram (cg)": 1e-2,
|
||||||
"Decigram (dg)" : 1e-1,
|
"Decigram (dg)": 1e-1,
|
||||||
"Gram (g)" : 1,
|
"Gram (g)": 1,
|
||||||
"Decagram (dag)" : 10,
|
"Decagram (dag)": 10,
|
||||||
"Hectogram (hg)" : 100,
|
"Hectogram (hg)": 100,
|
||||||
"Kilogram (kg)" : 1000,
|
"Kilogram (kg)": 1000,
|
||||||
"Megagram (Mg)" : 1e6,
|
"Megagram (Mg)": 1e6,
|
||||||
"Tonne (t)" : 1e6,
|
"Tonne (t)": 1e6,
|
||||||
"Gigagram (Gg)" : 1e9,
|
"Gigagram (Gg)": 1e9,
|
||||||
"Teragram (Tg)" : 1e12,
|
"Teragram (Tg)": 1e12,
|
||||||
"Petagram (Pg)" : 1e15,
|
"Petagram (Pg)": 1e15,
|
||||||
"Exagram (Eg)" : 1e18,
|
"Exagram (Eg)": 1e18,
|
||||||
"Zettagram (Zg)" : 1e21,
|
"Zettagram (Zg)": 1e21,
|
||||||
"Yottagram (Yg)" : 1e24,
|
"Yottagram (Yg)": 1e24,
|
||||||
|
|
||||||
// Imperial Avoirdupois
|
// Imperial Avoirdupois
|
||||||
"Grain (gr)" : 64.79891e-3,
|
"Grain (gr)": 64.79891e-3,
|
||||||
"Dram (dr)" : 1.7718451953125,
|
"Dram (dr)": 1.7718451953125,
|
||||||
"Ounce (oz)" : 28.349523125,
|
"Ounce (oz)": 28.349523125,
|
||||||
"Pound (lb)" : 453.59237,
|
"Pound (lb)": 453.59237,
|
||||||
"Nail" : 3175.14659,
|
"Nail": 3175.14659,
|
||||||
"Stone (st)" : 6.35029318e3,
|
"Stone (st)": 6.35029318e3,
|
||||||
"Quarter (gr)" : 12700.58636,
|
"Quarter (gr)": 12700.58636,
|
||||||
"Tod" : 12700.58636,
|
"Tod": 12700.58636,
|
||||||
"US hundredweight (cwt)" : 45.359237e3,
|
"US hundredweight (cwt)": 45.359237e3,
|
||||||
"Imperial hundredweight (cwt)" : 50.80234544e3,
|
"Imperial hundredweight (cwt)": 50.80234544e3,
|
||||||
"US ton (t)" : 907.18474e3,
|
"US ton (t)": 907.18474e3,
|
||||||
"Imperial ton (t)" : 1016.0469088e3,
|
"Imperial ton (t)": 1016.0469088e3,
|
||||||
|
|
||||||
// Imperial Troy
|
// Imperial Troy
|
||||||
"Pennyweight (dwt)" : 1.55517384,
|
"Pennyweight (dwt)": 1.55517384,
|
||||||
"Troy dram (dr t)" : 3.8879346,
|
"Troy dram (dr t)": 3.8879346,
|
||||||
"Troy ounce (oz t)" : 31.1034768,
|
"Troy ounce (oz t)": 31.1034768,
|
||||||
"Troy pound (lb t)" : 373.2417216,
|
"Troy pound (lb t)": 373.2417216,
|
||||||
"Mark" : 248.8278144,
|
"Mark": 248.8278144,
|
||||||
|
|
||||||
// Archaic
|
// Archaic
|
||||||
"Wey" : 76.5e3,
|
"Wey": 76.5e3,
|
||||||
"Wool wey" : 101.7e3,
|
"Wool wey": 101.7e3,
|
||||||
"Suffolk wey" : 161.5e3,
|
"Suffolk wey": 161.5e3,
|
||||||
"Wool sack" : 153000,
|
"Wool sack": 153000,
|
||||||
"Coal sack" : 50.80234544e3,
|
"Coal sack": 50.80234544e3,
|
||||||
"Load" : 918000,
|
"Load": 918000,
|
||||||
"Last" : 1836000,
|
"Last": 1836000,
|
||||||
"Flax or feather last" : 770e3,
|
"Flax or feather last": 770e3,
|
||||||
"Gunpowder last" : 1090e3,
|
"Gunpowder last": 1090e3,
|
||||||
"Picul" : 60.478982e3,
|
"Picul": 60.478982e3,
|
||||||
"Rice last" : 1200e3,
|
"Rice last": 1200e3,
|
||||||
|
|
||||||
// Comparisons
|
// Comparisons
|
||||||
"Big Ben (14 tonnes)" : 14e6,
|
"Big Ben (14 tonnes)": 14e6,
|
||||||
"Blue whale (180 tonnes)" : 180e6,
|
"Blue whale (180 tonnes)": 180e6,
|
||||||
"International Space Station (417 tonnes)" : 417e6,
|
"International Space Station (417 tonnes)": 417e6,
|
||||||
"Space Shuttle (2,041 tonnes)" : 2041e6,
|
"Space Shuttle (2,041 tonnes)": 2041e6,
|
||||||
"RMS Titanic (52,000 tonnes)" : 52000e6,
|
"RMS Titanic (52,000 tonnes)": 52000e6,
|
||||||
"Great Pyramid of Giza (6,000,000 tonnes)" : 6e12,
|
"Great Pyramid of Giza (6,000,000 tonnes)": 6e12,
|
||||||
"Earth's oceans (1.4 yottagrams)" : 1.4e24,
|
"Earth's oceans (1.4 yottagrams)": 1.4e24,
|
||||||
|
|
||||||
// Astronomical
|
// Astronomical
|
||||||
"A teaspoon of neutron star (5,500 million tonnes)" : 5.5e15,
|
"A teaspoon of neutron star (5,500 million tonnes)": 5.5e15,
|
||||||
"Lunar mass (ML)" : 7.342e25,
|
"Lunar mass (ML)": 7.342e25,
|
||||||
"Earth mass (M⊕)" : 5.97219e27,
|
"Earth mass (M⊕)": 5.97219e27,
|
||||||
"Jupiter mass (MJ)" : 1.8981411476999997e30,
|
"Jupiter mass (MJ)": 1.8981411476999997e30,
|
||||||
"Solar mass (M☉)" : 1.98855e33,
|
"Solar mass (M☉)": 1.98855e33,
|
||||||
"Sagittarius A* (7.5 x 10^36 kgs-ish)" : 7.5e39,
|
"Sagittarius A* (7.5 x 10^36 kgs-ish)": 7.5e39,
|
||||||
"Milky Way galaxy (1.2 x 10^42 kgs)" : 1.2e45,
|
"Milky Way galaxy (1.2 x 10^42 kgs)": 1.2e45,
|
||||||
"The observable universe (1.45 x 10^53 kgs)" : 1.45e56,
|
"The observable universe (1.45 x 10^53 kgs)": 1.45e56,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -361,37 +361,37 @@ const Convert = {
|
||||||
*/
|
*/
|
||||||
SPEED_FACTOR: { // Multiples of m/s
|
SPEED_FACTOR: { // Multiples of m/s
|
||||||
// Metric
|
// Metric
|
||||||
"Metres per second (m/s)" : 1,
|
"Metres per second (m/s)": 1,
|
||||||
"Kilometres per hour (km/h)" : 0.2778,
|
"Kilometres per hour (km/h)": 0.2778,
|
||||||
|
|
||||||
// Imperial
|
// Imperial
|
||||||
"Miles per hour (mph)" : 0.44704,
|
"Miles per hour (mph)": 0.44704,
|
||||||
"Knots (kn)" : 0.5144,
|
"Knots (kn)": 0.5144,
|
||||||
|
|
||||||
// Comparisons
|
// Comparisons
|
||||||
"Human hair growth rate" : 4.8e-9,
|
"Human hair growth rate": 4.8e-9,
|
||||||
"Bamboo growth rate" : 1.4e-5,
|
"Bamboo growth rate": 1.4e-5,
|
||||||
"World's fastest snail" : 0.00275,
|
"World's fastest snail": 0.00275,
|
||||||
"Usain Bolt's top speed" : 12.42,
|
"Usain Bolt's top speed": 12.42,
|
||||||
"Jet airliner cruising speed" : 250,
|
"Jet airliner cruising speed": 250,
|
||||||
"Concorde" : 603,
|
"Concorde": 603,
|
||||||
"SR-71 Blackbird" : 981,
|
"SR-71 Blackbird": 981,
|
||||||
"Space Shuttle" : 1400,
|
"Space Shuttle": 1400,
|
||||||
"International Space Station" : 7700,
|
"International Space Station": 7700,
|
||||||
|
|
||||||
// Scientific
|
// Scientific
|
||||||
"Sound in standard atmosphere" : 340.3,
|
"Sound in standard atmosphere": 340.3,
|
||||||
"Sound in water" : 1500,
|
"Sound in water": 1500,
|
||||||
"Lunar escape velocity" : 2375,
|
"Lunar escape velocity": 2375,
|
||||||
"Earth escape velocity" : 11200,
|
"Earth escape velocity": 11200,
|
||||||
"Earth's solar orbit" : 29800,
|
"Earth's solar orbit": 29800,
|
||||||
"Solar system's Milky Way orbit" : 200000,
|
"Solar system's Milky Way orbit": 200000,
|
||||||
"Milky Way relative to the cosmic microwave background" : 552000,
|
"Milky Way relative to the cosmic microwave background": 552000,
|
||||||
"Solar escape velocity" : 617700,
|
"Solar escape velocity": 617700,
|
||||||
"Neutron star escape velocity (0.3c)" : 100000000,
|
"Neutron star escape velocity (0.3c)": 100000000,
|
||||||
"Light in a diamond (0.4136c)" : 124000000,
|
"Light in a diamond (0.4136c)": 124000000,
|
||||||
"Signal in an optical fibre (0.667c)" : 200000000,
|
"Signal in an optical fibre (0.667c)": 200000000,
|
||||||
"Light (c)" : 299792458,
|
"Light (c)": 299792458,
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,25 +18,25 @@ const OS = {
|
||||||
*/
|
*/
|
||||||
runParseUnixPerms: function(input, args) {
|
runParseUnixPerms: function(input, args) {
|
||||||
let perms = {
|
let perms = {
|
||||||
d : false, // directory
|
d: false, // directory
|
||||||
sl : false, // symbolic link
|
sl: false, // symbolic link
|
||||||
np : false, // named pipe
|
np: false, // named pipe
|
||||||
s : false, // socket
|
s: false, // socket
|
||||||
cd : false, // character device
|
cd: false, // character device
|
||||||
bd : false, // block device
|
bd: false, // block device
|
||||||
dr : false, // door
|
dr: false, // door
|
||||||
sb : false, // sticky bit
|
sb: false, // sticky bit
|
||||||
su : false, // setuid
|
su: false, // setuid
|
||||||
sg : false, // setgid
|
sg: false, // setgid
|
||||||
ru : false, // read user
|
ru: false, // read user
|
||||||
wu : false, // write user
|
wu: false, // write user
|
||||||
eu : false, // execute user
|
eu: false, // execute user
|
||||||
rg : false, // read group
|
rg: false, // read group
|
||||||
wg : false, // write group
|
wg: false, // write group
|
||||||
eg : false, // execute group
|
eg: false, // execute group
|
||||||
ro : false, // read other
|
ro: false, // read other
|
||||||
wo : false, // write other
|
wo: false, // write other
|
||||||
eo : false // execute other
|
eo: false // execute other
|
||||||
},
|
},
|
||||||
d = 0,
|
d = 0,
|
||||||
u = 0,
|
u = 0,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -193,17 +193,17 @@ const StrUtils = {
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
FIND_REPLACE_GLOBAL : true,
|
FIND_REPLACE_GLOBAL: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
FIND_REPLACE_CASE : false,
|
FIND_REPLACE_CASE: false,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
FIND_REPLACE_MULTILINE : true,
|
FIND_REPLACE_MULTILINE: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find / Replace operation.
|
* Find / Replace operation.
|
||||||
|
|
|
@ -16,32 +16,32 @@ const Tidy = {
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_SPACES : true,
|
REMOVE_SPACES: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_CARIAGE_RETURNS : true,
|
REMOVE_CARIAGE_RETURNS: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_LINE_FEEDS : true,
|
REMOVE_LINE_FEEDS: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_TABS : true,
|
REMOVE_TABS: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_FORM_FEEDS : true,
|
REMOVE_FORM_FEEDS: true,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
REMOVE_FULL_STOPS : false,
|
REMOVE_FULL_STOPS: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove whitespace operation.
|
* Remove whitespace operation.
|
||||||
|
@ -89,17 +89,17 @@ const Tidy = {
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
APPLY_TO_EACH_LINE : false,
|
APPLY_TO_EACH_LINE: false,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
DROP_START : 0,
|
DROP_START: 0,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
DROP_LENGTH : 5,
|
DROP_LENGTH: 5,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Drop bytes operation.
|
* Drop bytes operation.
|
||||||
|
@ -200,17 +200,17 @@ const Tidy = {
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
PAD_POSITION : ["Start", "End"],
|
PAD_POSITION: ["Start", "End"],
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
PAD_LENGTH : 5,
|
PAD_LENGTH: 5,
|
||||||
/**
|
/**
|
||||||
* @constant
|
* @constant
|
||||||
* @default
|
* @default
|
||||||
*/
|
*/
|
||||||
PAD_CHAR : " ",
|
PAD_CHAR: " ",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pad lines operation.
|
* Pad lines operation.
|
||||||
|
|
|
@ -166,7 +166,7 @@ InputWaiter.prototype.inputDrop = function(e) {
|
||||||
this.set(inputCharcode);
|
this.set(inputCharcode);
|
||||||
const recipeConfig = this.app.getRecipeConfig();
|
const recipeConfig = this.app.getRecipeConfig();
|
||||||
if (!recipeConfig[0] || recipeConfig[0].op !== "From Hex") {
|
if (!recipeConfig[0] || recipeConfig[0].op !== "From Hex") {
|
||||||
recipeConfig.unshift({op:"From Hex", args:["Space"]});
|
recipeConfig.unshift({op: "From Hex", args: ["Space"]});
|
||||||
this.app.setRecipeConfig(recipeConfig);
|
this.app.setRecipeConfig(recipeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,15 +38,15 @@ function main() {
|
||||||
];
|
];
|
||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
updateUrl : true,
|
updateUrl: true,
|
||||||
showHighlighter : true,
|
showHighlighter: true,
|
||||||
treatAsUtf8 : true,
|
treatAsUtf8: true,
|
||||||
wordWrap : true,
|
wordWrap: true,
|
||||||
showErrors : true,
|
showErrors: true,
|
||||||
errorTimeout : 4000,
|
errorTimeout: 4000,
|
||||||
autoBakeThreshold : 200,
|
autoBakeThreshold: 200,
|
||||||
attemptHighlight : true,
|
attemptHighlight: true,
|
||||||
theme : "classic",
|
theme: "classic",
|
||||||
};
|
};
|
||||||
|
|
||||||
document.removeEventListener("DOMContentLoaded", main, false);
|
document.removeEventListener("DOMContentLoaded", main, false);
|
||||||
|
|
|
@ -14,12 +14,12 @@ TestRegister.addTests([
|
||||||
expectedOutput: "The cat sat on the mat.",
|
expectedOutput: "The cat sat on the mat.",
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
"op" : "From Hex",
|
"op": "From Hex",
|
||||||
"args" : ["Space"]
|
"args": ["Space"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"op" : "Bzip2 Decompress",
|
"op": "Bzip2 Decompress",
|
||||||
"args" : []
|
"args": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,11 +59,11 @@ TestRegister.addTests([
|
||||||
input: "Some data with a 1 in it\nSome data with a 2 in it",
|
input: "Some data with a 1 in it\nSome data with a 2 in it",
|
||||||
expectedOutput: "U29tZSBkYXRhIHdpdGggYSAxIGluIGl0\n53 6f 6d 65 20 64 61 74 61 20 77 69 74 68 20 61 20 32 20 69 6e 20 69 74\n",
|
expectedOutput: "U29tZSBkYXRhIHdpdGggYSAxIGluIGl0\n53 6f 6d 65 20 64 61 74 61 20 77 69 74 68 20 61 20 32 20 69 6e 20 69 74\n",
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{"op":"Fork", "args":["\\n", "\\n", false]},
|
{"op": "Fork", "args": ["\\n", "\\n", false]},
|
||||||
{"op":"Conditional Jump", "args":["1", "2", "10"]},
|
{"op": "Conditional Jump", "args": ["1", "2", "10"]},
|
||||||
{"op":"To Hex", "args":["Space"]},
|
{"op": "To Hex", "args": ["Space"]},
|
||||||
{"op":"Return", "args":[]},
|
{"op": "Return", "args": []},
|
||||||
{"op":"To Base64", "args":["A-Za-z0-9+/="]}
|
{"op": "To Base64", "args": ["A-Za-z0-9+/="]}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue