nl_tokens: Load providers configuration loading its pre and postfilters modules .
pl_tokens: function loadProviders ( providers ) { var result = [ ] , index , num = providers . length , provider , prefilters , postfilters , resources ; for ( index = 0 ; index < num ; index ++ ) { provider = providers [ index ] ; prefilters = [ ] ; postfilters = [ ] ; resources = [ ] ; // Check provider has required properties if ( ! provider . id ) { throw new InvalidConfiguration ( InvalidConfiguration . INVALID_PROVIDER_MESSAGE + " Provider at index " + index + " has no 'id' property." ) ; } if ( ! provider . target ) { throw new InvalidConfiguration ( InvalidConfiguration . INVALID_PROVIDER_MESSAGE + " Provider at index " + index + " has no 'target' property." ) ; } if ( ! provider . context ) { throw <mask> InvalidConfiguration ( InvalidConfiguration . INVALID_PROVIDER_MESSAGE + " Provider at index " + index + " has no context' property." ) ; } // Load provider's filters if ( provider . prefilters ) { prefilters = loadMiddlewareFilters ( provider . prefilters ) ; } if ( provider . postfilters ) { postfilters = loadMiddlewareFilters ( provider . postfilters ) ; } // Load provider's resources if ( provider . resources ) { resources = loadResources ( provider . resources , index ) ; } // Store provider information result . push ( { id : provider . id , context : provider . context , target : provider . target , prefilters : prefilters , postfilters : postfilters , resources : resources } ) ; } return result ; }