@dot-event/version
Version:
dot-event package version operation
21 lines (17 loc) • 499 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.spaceStr = spaceStr;
function spaceStr(id, str = "") {
const space = this.events.get(`space.${id}`);
const newSpace = str.length + 2;
let finalSpace = space;
if (!space || newSpace > space) {
this.events.set(`space.${id}`, newSpace);
finalSpace = newSpace;
}
const spaces = " ".repeat(finalSpace - str.length - (str ? 0 : 1));
return str + spaces;
}
//# sourceMappingURL=spaceStr.js.map