Browse Source

rename node Recipe > NodeRecipe to avoid naming confusion

d98762625 6 years ago
parent
commit
c6a292bccb
2 changed files with 5 additions and 5 deletions
  1. 2 2
      src/node/NodeRecipe.mjs
  2. 3 3
      src/node/api.mjs

+ 2 - 2
src/node/Recipe.mjs → src/node/NodeRecipe.mjs

@@ -12,7 +12,7 @@ import { sanitise } from "./apiUtils";
  * the SyncDish the operate on. However, this Recipe is for the node
  * environment.
  */
-class Recipe {
+class NodeRecipe {
 
     /**
      * Recipe constructor
@@ -88,4 +88,4 @@ class Recipe {
     }
 }
 
-export default Recipe;
+export default NodeRecipe;

+ 3 - 3
src/node/api.mjs

@@ -8,7 +8,7 @@
 
 import Dish from "../core/Dish";
 import SyncDish from "./SyncDish";
-import Recipe from "./Recipe";
+import NodeRecipe from "./NodeRecipe";
 import OperationConfig from "./config/OperationConfig.json";
 import { sanitise } from "./apiUtils";
 import ExludedOperationError from "../core/errors/ExcludedOperationError";
@@ -242,7 +242,7 @@ export function bake(operations){
      * @throws {TypeError} if invalid recipe given.
      */
     return function(input, recipeConfig) {
-        const recipe =  new Recipe(recipeConfig);
+        const recipe =  new NodeRecipe(recipeConfig);
         const dish = ensureIsDish(input);
         return recipe.execute(dish);
     };
@@ -259,7 +259,7 @@ export function explainExludedFunction(name) {
     const func = () => {
         throw new ExludedOperationError(`Sorry, the ${name} operation is not available in the Node.js version of CyberChef.`);
     };
-    // Add opName prop so Recipe can handle it, just like wrap does.
+    // Add opName prop so NodeRecipe can handle it, just like wrap does.
     func.opName = name;
     return func;
 }