1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import * as Handlebars from 'handlebars'; export function wrap(mark: string, str: string) { return `${mark}${str}${mark}`; } Handlebars.registerHelper('wrap', wrap); export function doubleQuote(str: string) { return `"${str}"`; } Handlebars.registerHelper('double-quote', doubleQuote); Handlebars.registerHelper('dq', doubleQuote); export function singleQuote(str: string) { return `'${str}'`; } Handlebars.registerHelper('single-quote', singleQuote); Handlebars.registerHelper('sq', singleQuote); |