nl_tokens: convert identifier into full system guid using : 1 ) exact match on key 2 ) partial match on key 3 ) partial match on name
pl_tokens: function ( identifier ) { identifier = identifier . replace ( / [.+] / g , function ( match ) { return '\\' + match ; } ) ; var re = new RegExp ( '^' + identifier + '.*' , [ 'i' ] ) ; var systemId ; systemId = _ . find ( _ . keys ( _systems ) , function ( system ) { return system === identifier ; } ) ; if ( ! systemId ) { systemId = _ . find ( _ . keys ( _systems ) , function ( system ) { return <mask> . test ( system ) ; } ) ; } if ( ! systemId ) { systemId = _ . find ( _ . keys ( _systems ) , function ( system ) { return re . test ( _systems [ system ] . name ) ; } ) ; } return systemId ; }