frontend/.pnpm-store/v3/files/3b/87a1a117f534baeec24f7c544bf2935cb7e5cbfd550e675ce86c525f623bb186dfb2c6060f3eb935059313a5452149d9e8de91302f4450a7718e3b8e894a73

22 lines
742 B
Plaintext

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prepareContent = void 0;
const strip_indent_1 = __importDefault(require("strip-indent"));
// todo: could use magig-string and generate some sourcemaps 🗺
function prepareContent({ options, content, }) {
if (typeof options !== 'object') {
return content;
}
if (options.stripIndent) {
content = strip_indent_1.default(content);
}
if (options.prependData) {
content = `${options.prependData}\n${content}`;
}
return content;
}
exports.prepareContent = prepareContent;