@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
17 lines (15 loc) • 538 B
JavaScript
import { get } from "lodash-es";
//#region src/shared/datasources/utils.ts
function stringifyObjectValues(obj) {
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, value.toString()]));
}
function createPlaceholderReplacer(attr) {
return function replacePlaceholders(_, p1) {
const varName = p1.trim();
return String(get(attr, varName)) ?? "";
};
}
const placeholderRx = /{{(.+?)}}/g;
//#endregion
export { createPlaceholderReplacer, placeholderRx, stringifyObjectValues };
//# sourceMappingURL=utils.js.map