From 431f1d4be06bcc467de3d5665a85b687db605df7 Mon Sep 17 00:00:00 2001 From: d98762625 Date: Thu, 27 Sep 2018 17:40:22 +0100 Subject: [PATCH] housekeeping & add repl command to package --- .gitignore | 2 +- package.json | 2 +- src/core/Dish.mjs | 1 - src/node/NodeRecipe.mjs | 2 +- src/node/SyncDish.mjs | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 6e39dad8..9f59ffbd 100755 --- a/.gitignore +++ b/.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 \ No newline at end of file +**/*.DS_Store \ No newline at end of file diff --git a/package.json b/package.json index 4626446a..6de1c48e 100644 --- a/package.json +++ b/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" } diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs index 3a4398f2..b649640b 100755 --- a/src/core/Dish.mjs +++ b/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; diff --git a/src/node/NodeRecipe.mjs b/src/node/NodeRecipe.mjs index 024cb1c8..b49fb9f9 100644 --- a/src/node/NodeRecipe.mjs +++ b/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."); diff --git a/src/node/SyncDish.mjs b/src/node/SyncDish.mjs index 002e667d..0d8fed75 100644 --- a/src/node/SyncDish.mjs +++ b/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";