2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-20 10:13:42 +00:00

Tidied up the Magic operation

This commit is contained in:
n1474335
2020-03-24 11:06:37 +00:00
parent 26fa66ef64
commit b765534b8b
43 changed files with 771 additions and 900 deletions

View File

@@ -33,32 +33,28 @@ class FromUNIXTimestamp extends Operation {
"value": UNITS
}
];
this.checks = {
input: {
regex: [
{
match: "^1?\\d{9}$",
flags: "",
args: ["Seconds (s)"]
},
{
match: "^1?\\d{12}$",
flags: "",
args: ["Milliseconds (ms)"]
},
{
match: "^1?\\d{15}$",
flags: "",
args: ["Microseconds (μs)"]
},
{
match: "^1?\\d{18}$",
flags: "",
args: ["Nanoseconds (ns)"]
}
]
this.checks = [
{
pattern: "^1?\\d{9}$",
flags: "",
args: ["Seconds (s)"]
},
{
pattern: "^1?\\d{12}$",
flags: "",
args: ["Milliseconds (ms)"]
},
{
pattern: "^1?\\d{15}$",
flags: "",
args: ["Microseconds (μs)"]
},
{
pattern: "^1?\\d{18}$",
flags: "",
args: ["Nanoseconds (ns)"]
}
};
];
}
/**