Pad.js 415 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. function pad(count, separator) {
  4. return new Pad(count, separator);
  5. }
  6. exports.pad = pad;
  7. class Pad {
  8. constructor(count, separator = ' ') {
  9. this.count = count;
  10. this.separator = separator;
  11. }
  12. build() {
  13. return this.separator.repeat(this.count);
  14. }
  15. }
  16. exports.Pad = Pad;
  17. //# sourceMappingURL=Pad.js.map