UNPKG

@technobuddha/library

Version:
18 lines (17 loc) 514 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.indent = void 0; /** * Indent each line of a string * * @param input The string to indent * @param __namedParameters see {@Options} * @default indenter space * @returns string with each line indented */ function indent(input, _a) { var _b = _a === void 0 ? {} : _a, _c = _b.indenter, indenter = _c === void 0 ? ' ' : _c; return input.replace(/^/ugm, indenter); } exports.indent = indent; exports.default = indent;