ESM: Fixed OperationError detection and tidied up ops.

This commit is contained in:
n1474335 2018-05-16 10:17:49 +01:00
parent acb8a342a7
commit b760c2f1a0
17 changed files with 2134 additions and 2122 deletions

View file

@ -7,6 +7,7 @@
import Operation from "../Operation";
import XRegExp from "xregexp";
import { search } from "../lib/Extract";
/**
* Strings operation
*/
@ -56,10 +57,7 @@ class Strings extends Operation {
* @returns {string}
*/
run(input, args) {
const encoding = args[0],
minLen = args[1],
matchType = args[2],
displayTotal = args[3],
const [encoding, minLen, matchType, displayTotal] = args,
alphanumeric = "A-Z\\d",
punctuation = "/\\-:.,_$%'\"()<>= !\\[\\]{}@",
printable = "\x20-\x7e",