nl_tokens: Register an event handler @param identifier { string } the event type ( first part of event definition ) @param handlerOrOptions { function ( options callback ) * OR * options object }
pl_tokens: function ( identifier , optionsOrHandler ) { if ( typeof optionsOrHandler !== 'function' ) { // it's options optionsOrHandler = handlerTemplates [ optionsOrHandler . type || 'standard' ] ( optionsOrHandler ) ; } if ( identifier instanceof RegExp ) { patternHandlers . push ( { <mask> : identifier , handler : optionsOrHandler } ) ; } else { handlers [ identifier ] = optionsOrHandler ; } }