UNPKG

postel-ita

Version:

Library to create files compatible with italian Poste Postel system

26 lines 902 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Lang_1 = __importDefault(require("./Lang")); class MissiveBody { constructor(payment) { this.pPayment = payment; this._rows = []; } addRow(distance, position = 'rel') { const newRow = Lang_1.default.PostelRow({ type: position, value: distance }); this._rows.push(newRow); return (this._rows.at(-1) || Lang_1.default.PostelRow({ type: position, value: distance })); } result() { const rows = []; rows.push('@T'); rows.push(this._rows.join(Lang_1.default.EOL)); return rows.join(Lang_1.default.EOL); } } exports.default = MissiveBody; //# sourceMappingURL=MissiveBody.js.map