UNPKG

parjs

Version:

Library for building parsers using combinators.

20 lines 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.padInt = exports.recJoin = void 0; function recJoin(arr) { if (arr instanceof Array) { return arr.map(x => recJoin(x)).join(""); } else { return String(arr); } } exports.recJoin = recJoin; function padInt(n, digits, char) { const str = n.toString(); if (str.length >= digits) return str; return char.repeat(digits - str.length) + str; } exports.padInt = padInt; //# sourceMappingURL=index.js.map