UNPKG

squarier

Version:

This package can help you format text in a square like manner.

34 lines 984 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Token = void 0; var Token = /** @class */ (function () { function Token(value) { this._value = value; } Object.defineProperty(Token.prototype, "value", { get: function () { return this._value; }, enumerable: false, configurable: true }); Object.defineProperty(Token.prototype, "weight", { get: function () { if (this._value.slice(0, 2) === '//') { return 0; } return this._value.length; }, enumerable: false, configurable: true }); Token.prototype.transform = function (fn) { this._value = fn(this._value); }; Token.prototype.toString = function () { return "value: '".concat(this.value, "'; weight: ").concat(this.weight); }; return Token; }()); exports.Token = Token; //# sourceMappingURL=Token.js.map