Merge branch 'prefer-const' of https://github.com/graingert/CyberChef into graingert-prefer-const

This commit is contained in:
n1474335 2017-05-06 14:11:38 +01:00
commit 5efe9bd91d
15 changed files with 165 additions and 163 deletions

View file

@ -426,7 +426,7 @@ const Code = {
* @returns {string}
*/
_replaceVariableNames(input, replacer) {
let tokenRegex = /\\"|"(?:\\"|[^"])*"|(\b[a-z0-9\-_]+\b)/ig;
const tokenRegex = /\\"|"(?:\\"|[^"])*"|(\b[a-z0-9\-_]+\b)/ig;
return input.replace(tokenRegex, (...args) => {
let match = args[0],
@ -450,7 +450,7 @@ const Code = {
*
*/
runToSnakeCase(input, args) {
let smart = args[0];
const smart = args[0];
if (smart) {
return Code._replaceVariableNames(input, snakeCase);
@ -469,7 +469,7 @@ const Code = {
*
*/
runToCamelCase(input, args) {
let smart = args[0];
const smart = args[0];
if (smart) {
return Code._replaceVariableNames(input, camelCase);
@ -488,7 +488,7 @@ const Code = {
*
*/
runToKebabCase(input, args) {
let smart = args[0];
const smart = args[0];
if (smart) {
return Code._replaceVariableNames(input, kebabCase);

View file

@ -471,7 +471,7 @@ const StrUtils = {
number = args[1];
delimiter = Utils.charRep[delimiter];
let splitInput = input.split(delimiter);
const splitInput = input.split(delimiter);
return splitInput
.filter((line, lineIndex) => {
@ -499,7 +499,7 @@ const StrUtils = {
number = args[1];
delimiter = Utils.charRep[delimiter];
let splitInput = input.split(delimiter);
const splitInput = input.split(delimiter);
return splitInput
.filter((line, lineIndex) => {