test-openapi
Version:
Automated client requests
26 lines (18 loc) • 689 B
JavaScript
require("core-js/modules/es.string.replace");Object.defineProperty(exports,"__esModule",{value:true});exports.indent=exports.indentValue=void 0;
const indentValue=function(string){
if(!shouldIndent(string)){
return string;
}
const stringA=string.replace(/^\n*/u,"\n");
return indent(stringA);
};exports.indentValue=indentValue;
const shouldIndent=function(string){
return string.includes("\n");
};
const indent=function(string,extraIndent=0){
const size=INDENT_SIZE+extraIndent;
const indentString=" ".repeat(size);
return indentString+String(string).replace(/\n/gu,`\n${indentString}`);
};exports.indent=indent;
const INDENT_SIZE=2;
//# sourceMappingURL=indent.js.map
;