spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← All files
name: src/Formulas.ts
-rw-r--r--
563
 1import * as AllFormulas from "./Formulas/AllFormulas";
 2import {
 3  __TRY_CATCH_FORMULAS
 4} from "./Formulas/AllFormulas";
 5
 6let Formulas = {
 7  exists: function(fn: string) {
 8    return ((fn in AllFormulas) || (fn in AllFormulas.__COMPLEX));
 9  },
10  get: function(fn: string) {
11    if (fn in AllFormulas) {
12      return AllFormulas[fn];
13    }
14    if (fn in AllFormulas.__COMPLEX) {
15      return AllFormulas.__COMPLEX[fn];
16    }
17  },
18  isTryCatchFormula: function (fn: string) : boolean {
19    return __TRY_CATCH_FORMULAS[fn] !== undefined;
20  }
21};
22
23export {
24  Formulas
25}