UNPKG

preferans-paper-js

Version:
27 lines 714 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const lodash_1 = require("lodash"); const _isEven = (n) => n % 2 === 0; class PrefPaperColumn { constructor() { this._value = 0; this._initialValue = 0; this._values = []; } static isValidValue(v) { return v > 0 && _isEven(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