import { IHtmlEngineHelper , IHandlebarsOptions } from './html-engine-helper.interface' ; export class OneParameterHasHelper implements IHtmlEngineHelper { public helperFunc ( context , tags , typeToCheck ) { let result = false ; let len = arguments . length - 1 ; let options = arguments [ len ] ; let i = 0 , leng = tags . length ; for ( i ; i < leng ; i ++ ) { if ( typeof tags [ i ] [ typeToCheck ] !== 'undefined' && tags [ i ] [ typeToCheck ] !== '' ) { result = true ; } } if ( result ) { return options . fn ( context ) ; } else { return options . inverse ( context ) ; } } }