Bladeren bron

housekeeping & add repl command to package

d98762625 6 jaren geleden
bovenliggende
commit
431f1d4be0
5 gewijzigde bestanden met toevoegingen van 3 en 5 verwijderingen
  1. 1 1
      .gitignore
  2. 1 1
      package.json
  3. 0 1
      src/core/Dish.mjs
  4. 1 1
      src/node/NodeRecipe.mjs
  5. 0 1
      src/node/SyncDish.mjs

+ 1 - 1
.gitignore

@@ -11,4 +11,4 @@ src/core/config/OperationConfig.json
 src/core/operations/index.mjs
 src/node/config/OperationConfig.json
 src/node/index.mjs
-**/*.DS_Storeg
+**/*.DS_Store

+ 1 - 1
package.json

@@ -134,7 +134,7 @@
     "test": "grunt test",
     "docs": "grunt docs",
     "lint": "grunt lint",
-    "build-node": "grunt node",
+    "repl": "node --experimental-modules --no-warnings src/node/repl-index.mjs",
     "newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs",
     "postinstall": "[ -f node_modules/crypto-api/src/crypto-api.mjs ] || npx j2m node_modules/crypto-api/src/crypto-api.js"
   }

+ 0 - 1
src/core/Dish.mjs

@@ -50,7 +50,6 @@ class Dish {
      */
     static typeEnum(typeStr) {
         switch (typeStr.toLowerCase()) {
-            case "array":
             case "bytearray":
             case "byte array":
                 return Dish.BYTE_ARRAY;

+ 1 - 1
src/node/NodeRecipe.mjs

@@ -38,7 +38,7 @@ class NodeRecipe {
                 throw new TypeError(`Couldn't find an operation with name '${ing}'.`);
             }
         } else if (typeof ing === "function") {
-            if (operations.findIndex(o => o === ing) > -1) {
+            if (operations.includes(ing)) {
                 return ing;
             } else {
                 throw new TypeError("Inputted function not a Chef operation.");

+ 0 - 1
src/node/SyncDish.mjs

@@ -2,7 +2,6 @@
  * @author d98762625 [d98762625@gmail.com]
  * @copyright Crown Copyright 2018
  * @license Apache-2.0
- * @module node
  */
 
 import util from "util";