From 3bbfc130d441a4c274e219c04e066213472b1ca5 Mon Sep 17 00:00:00 2001 From: d98762625 Date: Tue, 15 May 2018 14:59:28 +0100 Subject: [PATCH] create arithmetic specific delimiter options --- src/core/lib/Delim.mjs | 5 +++++ src/core/operations/Divide.mjs | 4 ++-- src/core/operations/Mean.mjs | 4 ++-- src/core/operations/Median.mjs | 4 ++-- src/core/operations/Multiply.mjs | 4 ++-- src/core/operations/StandardDeviation.mjs | 4 ++-- src/core/operations/Subtract.mjs | 4 ++-- src/core/operations/Sum.mjs | 4 ++-- 8 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/core/lib/Delim.mjs b/src/core/lib/Delim.mjs index a1a3dbb7..8e424300 100644 --- a/src/core/lib/Delim.mjs +++ b/src/core/lib/Delim.mjs @@ -31,6 +31,11 @@ export const WORD_DELIM_OPTIONS = ["Line feed", "CRLF", "Forward slash", "Backsl */ export const INPUT_DELIM_OPTIONS = ["Line feed", "CRLF", "Space", "Comma", "Semi-colon", "Colon", "Nothing (separate chars)"]; +/** + * Arithmetic sequence delimiters + */ +export const ARITHMETIC_DELIM_OPTIONS = ["Line feed", "Space", "Comma", "Semi-colon", "Colon", "CRLF"]; + /** * Split delimiters. */ diff --git a/src/core/operations/Divide.mjs b/src/core/operations/Divide.mjs index 66463274..76f50313 100644 --- a/src/core/operations/Divide.mjs +++ b/src/core/operations/Divide.mjs @@ -8,7 +8,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { div, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** @@ -31,7 +31,7 @@ class Divide extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/Mean.mjs b/src/core/operations/Mean.mjs index 2bd5f3bc..16342e7a 100644 --- a/src/core/operations/Mean.mjs +++ b/src/core/operations/Mean.mjs @@ -7,7 +7,7 @@ import Operation from "../Operation"; import { mean, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; import BigNumber from "bignumber.js"; /** @@ -30,7 +30,7 @@ class Mean extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/Median.mjs b/src/core/operations/Median.mjs index df2b8418..b1936fa8 100644 --- a/src/core/operations/Median.mjs +++ b/src/core/operations/Median.mjs @@ -8,7 +8,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { median, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** * Median operation @@ -30,7 +30,7 @@ class Median extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/Multiply.mjs b/src/core/operations/Multiply.mjs index 6312cf2b..3f78daa4 100644 --- a/src/core/operations/Multiply.mjs +++ b/src/core/operations/Multiply.mjs @@ -8,7 +8,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { multi, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** @@ -31,7 +31,7 @@ class Multiply extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/StandardDeviation.mjs b/src/core/operations/StandardDeviation.mjs index 65bd2e1b..d2da24f8 100644 --- a/src/core/operations/StandardDeviation.mjs +++ b/src/core/operations/StandardDeviation.mjs @@ -8,7 +8,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { stdDev, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** @@ -31,7 +31,7 @@ class StandardDeviation extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/Subtract.mjs b/src/core/operations/Subtract.mjs index c45a93b2..ac00156c 100644 --- a/src/core/operations/Subtract.mjs +++ b/src/core/operations/Subtract.mjs @@ -8,7 +8,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { sub, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** @@ -31,7 +31,7 @@ class Subtract extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; } diff --git a/src/core/operations/Sum.mjs b/src/core/operations/Sum.mjs index a1a0fa83..0aedcd76 100644 --- a/src/core/operations/Sum.mjs +++ b/src/core/operations/Sum.mjs @@ -7,7 +7,7 @@ import BigNumber from "bignumber.js"; import Operation from "../Operation"; import { sum, createNumArray } from "../lib/Arithmetic"; -import { DELIM_OPTIONS } from "../lib/Delim"; +import { ARITHMETIC_DELIM_OPTIONS } from "../lib/Delim"; /** @@ -30,7 +30,7 @@ class Sum extends Operation { { "name": "Delimiter", "type": "option", - "value": DELIM_OPTIONS, + "value": ARITHMETIC_DELIM_OPTIONS, } ]; }