chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:48 +08:00
commit 77bb5bf71f
3762 changed files with 353249 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import hb from 'handlebars'
import * as casing from './case-utils'
hb.registerHelper('toUpperCase', (s) => s.toUpperCase())
hb.registerHelper('toLowerCase', (s) => s.toLowerCase())
hb.registerHelper('pascalCase', casing.to.pascalCase)
hb.registerHelper('kebabCase', casing.to.kebabCase)
hb.registerHelper('snakeCase', casing.to.snakeCase)
hb.registerHelper('screamingSnakeCase', casing.to.screamingSnakeCase)
hb.registerHelper('camelCase', casing.to.camelCase)
export const formatHandleBars = (templateStr: string, data: Record<string, string>): string => {
const template = hb.compile(templateStr)
return template(data)
}