UNPKG

ddl-manager

Version:

store postgres procedures and triggers in files

17 lines (12 loc) 326 B
export function wrapText(text: string, tag: string = "tag") { text += ""; if ( !text.includes(`$${tag}$`) ) { return `$${tag}$${ text }$${tag}$`; } let index = 1; while ( text.includes("$tag" + index + "$") ) { index++; } tag += index; return `$${tag}$${ text }$${tag}$`; }