@tinymce/beehive-flow
Version:
A CLI tool implementing the beehive flow git branching process
12 lines (9 loc) • 450 B
text/typescript
// Some of these functions were copied from Katamari. Trying to avoid dependencies on Tiny libraries in this tool.
/**
* Show the parameter as a JS literal
* @param s
*/
export const showStringOrUndefined = (s: string | undefined): string =>
s === undefined ? 'undefined' : '"' + s.replace(/"/g, '\\"') + '"';
export const removeLeading = (str: string, prefix: string): string =>
str.startsWith(prefix) ? str.substring(prefix.length) : str;