mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 09:46:17 -04:00
autofix no-var
This commit is contained in:
parent
31e5d785fe
commit
b33f73ac9a
61 changed files with 699 additions and 698 deletions
|
@ -11,7 +11,7 @@ import Utils from "./Utils.js";
|
|||
* @class
|
||||
* @param {Object} ingredientConfig
|
||||
*/
|
||||
var Ingredient = function(ingredientConfig) {
|
||||
const Ingredient = function(ingredientConfig) {
|
||||
this.name = "";
|
||||
this.type = "";
|
||||
this.value = null;
|
||||
|
@ -78,7 +78,7 @@ Ingredient.prepare = function(data, type) {
|
|||
case "number":
|
||||
var number = parseFloat(data);
|
||||
if (isNaN(number)) {
|
||||
var sample = Utils.truncate(data.toString(), 10);
|
||||
const sample = Utils.truncate(data.toString(), 10);
|
||||
throw "Invalid ingredient value. Not a number: " + sample;
|
||||
}
|
||||
return number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue