nl_tokens: Creates a map ( object ) keyed by the elements of the given array . The values in the map are the index + 1 of the array element . For example :
pl_tokens: function ( array , getKey , scope ) { var map = { } , i = array . length ; if ( ! getKey ) { while ( i -- ) { map [ array [ i ] ] = i + 1 ; } } else if ( typeof getKey == 'string' ) { while ( i -- ) { map [ array [ i ] [ getKey ] ] = i + 1 ; } } else { while ( i -- ) { map [ getKey . call ( <mask> , array [ i ] ) ] = i + 1 ; } } return map ; }