1 | import { IHtmlEngineHelper, IHandlebarsOptions } from './html-engine-helper.interface';
|
2 |
|
3 | export class IfStringHelper implements IHtmlEngineHelper {
|
4 | public helperFunc(context: any, a: any, options: IHandlebarsOptions): string {
|
5 | if (typeof a === 'string') {
|
6 | return options.fn(context);
|
7 | }
|
8 | return options.inverse(context);
|
9 | }
|
10 | }
|