UNPKG

preferans-paper-js

Version:
27 lines 717 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const lodash_1 = require("lodash"); const is_even_1 = require("./functions/is.even"); class PrefPaperColumn { constructor() { this._value = 0; this._initialValue = 0; this._values = []; } static isValidValue(v) { return v > 0 && (0, is_even_1.default)(v); } reset() { this._values = []; this._value = this._initialValue; return this; } get value() { return this._value; } get json() { return (0, lodash_1.map)(this._values, (val) => val.json); } } exports.default = PrefPaperColumn; //# sourceMappingURL=pref.paper.column.js.map