mirror of
https://github.com/gchq/CyberChef
synced 2025-12-24 04:04:25 +00:00
Fixed some typos
This commit is contained in:
@@ -12,7 +12,7 @@ import NodeDish from "./NodeDish.mjs";
|
||||
import NodeRecipe from "./NodeRecipe.mjs";
|
||||
import OperationConfig from "../core/config/OperationConfig.json";
|
||||
import { sanitise, removeSubheadingsFromArray, sentenceToCamelCase } from "./apiUtils.mjs";
|
||||
import ExludedOperationError from "../core/errors/ExcludedOperationError.mjs";
|
||||
import ExcludedOperationError from "../core/errors/ExcludedOperationError.mjs";
|
||||
|
||||
|
||||
/**
|
||||
@@ -320,12 +320,12 @@ export function bake() {
|
||||
* Explain that the given operation is not included in the Node.js version.
|
||||
* @param {String} name - name of operation
|
||||
*/
|
||||
export function _explainExludedFunction(name) {
|
||||
export function _explainExcludedFunction(name) {
|
||||
/**
|
||||
* Throw new error type with useful message.
|
||||
*/
|
||||
const func = () => {
|
||||
throw new ExludedOperationError(`Sorry, the ${name} operation is not available in the Node.js version of CyberChef.`);
|
||||
throw new ExcludedOperationError(`Sorry, the ${name} operation is not available in the Node.js version of CyberChef.`);
|
||||
};
|
||||
// Add opName prop so NodeRecipe can handle it, just like wrap does.
|
||||
func.opName = name;
|
||||
|
||||
@@ -71,7 +71,7 @@ export function sanitise(str) {
|
||||
|
||||
|
||||
/**
|
||||
* sonething like this => somethingLikeThis
|
||||
* something like this => somethingLikeThis
|
||||
* ABC a sentence => ABCASentence
|
||||
*/
|
||||
export function sentenceToCamelCase(str) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Operations to exlude from the Node API
|
||||
* Operations to exclude from the Node API
|
||||
*
|
||||
* @author d98762656 [d98762625@gmail.com]
|
||||
* @copyright Crown Copyright 2018
|
||||
|
||||
@@ -39,7 +39,7 @@ let code = `/**
|
||||
|
||||
|
||||
import NodeDish from "./NodeDish.mjs";
|
||||
import { _wrap, help, bake, _explainExludedFunction } from "./api.mjs";
|
||||
import { _wrap, help, bake, _explainExcludedFunction } from "./api.mjs";
|
||||
import File from "./File.mjs";
|
||||
import { OperationError, DishError, ExcludedOperationError } from "../core/errors/index";
|
||||
import {
|
||||
@@ -70,7 +70,7 @@ includedOperations.forEach((op) => {
|
||||
});
|
||||
|
||||
excludedOperations.forEach((op) => {
|
||||
code += ` "${decapitalise(op)}": _explainExludedFunction("${op}"),\n`;
|
||||
code += ` "${decapitalise(op)}": _explainExcludedFunction("${op}"),\n`;
|
||||
});
|
||||
|
||||
code += ` };
|
||||
|
||||
Reference in New Issue
Block a user