spreadsheet
typeScript/javascript spreadsheet parser, with formulas.
git clone https://git.vogt.world/spreadsheet.git
Log | Files | README.md
← All files
name: dist/Utilities/ObjectBuilder.js
-rw-r--r--
698
 1"use strict";
 2exports.__esModule = true;
 3/**
 4 * Utility class to help build objects programmatically. Basically this allows me to have source code where constants
 5 * are keys in objects.
 6 */
 7var ObjectBuilder = /** @class */ (function () {
 8    function ObjectBuilder() {
 9        this.o = {};
10    }
11    ObjectBuilder.add = function (k, v) {
12        var m = new ObjectBuilder();
13        m.o[k.toString()] = v;
14        return m;
15    };
16    ObjectBuilder.prototype.add = function (k, v) {
17        this.o[k.toString()] = v;
18        return this;
19    };
20    ObjectBuilder.prototype.build = function () {
21        return this.o;
22    };
23    return ObjectBuilder;
24}());
25exports.ObjectBuilder = ObjectBuilder;