import { IHtmlEngineHelper , IHandlebarsOptions } from './html-engine-helper.interface' ; export class FilterAngular2ModulesHelper implements IHtmlEngineHelper { public helperFunc ( context , text , options ) { const NG2_MODULES = [ 'BrowserModule' , 'FormsModule' , 'HttpModule' , 'RouterModule' ] ; let len = NG2_MODULES . length ; let i = 0 ; let result = false ; for ( i ; i < len ; i ++ ) { if ( text . indexOf ( NG2_MODULES [ i ] ) > - 1 ) { result = true ; } } if ( result ) { return options . fn ( context ) ; } else { return options . inverse ( context ) ; } } }