ソースを参照

create arithmetic specific delimiter options

d98762625 7 年 前
コミット
3bbfc130d4

+ 5 - 0
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.
  */

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }

+ 2 - 2
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,
             }
         ];
     }