mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
16 lines
633 B
TypeScript
16 lines
633 B
TypeScript
// @ts-nocheck
|
|
|
|
import * as Handlebars from 'handlebars/runtime';
|
|
|
|
export function registerHandlebarHelpers(): void {
|
|
Handlebars.registerHelper('equals', function (a: string, b: string, options: Handlebars.HelperOptions): string {
|
|
return a === b ? options.fn(this) : options.inverse(this);
|
|
});
|
|
Handlebars.registerHelper('notEquals', function (a: string, b: string, options: Handlebars.HelperOptions): string {
|
|
return a !== b ? options.fn(this) : options.inverse(this);
|
|
});
|
|
Handlebars.registerHelper('containsSpaces', function (value: string): boolean {
|
|
return /\s+/.test(value);
|
|
});
|
|
}
|