nl_tokens: Memoize a generated regex or function . A unique key is generated from the type ( usually method name ) the pattern and user - defined options .
pl_tokens: function memoize ( type , pattern , options , fn ) { var key = utils . createKey ( type + '=' + pattern , options ) ; if ( options && options . cache === false ) { return fn ( pattern , options ) ; } if ( cache . has ( type , key ) ) { return cache . get ( type , key ) ; } var val = fn ( pattern , options ) ; cache . set ( type , <mask> , val ) ; return val ; }