nl_tokens: Track that an item was added to the tracked array .
pl_tokens: function ( index , match ) { var returnValue = - 1 , itemType = match ? RETAIN : FILTER , self = this ; this . _findOperation ( index , function ( operation , operationIndex , rangeStart , rangeEnd , seenInSubArray ) { var newOperation , splitOperation ; if ( itemType === operation . type ) { ++ operation . count ; } else if ( index === rangeStart ) { // insert to the left of `operation` self . _operations . splice ( operationIndex , 0 , new Operation ( itemType , 1 ) ) ; } else { newOperation = new Operation ( itemType , 1 ) ; splitOperation = new Operation ( operation . type , rangeEnd - <mask> + 1 ) ; operation . count = index - rangeStart ; self . _operations . splice ( operationIndex + 1 , 0 , newOperation , splitOperation ) ; } if ( match ) { if ( operation . type === RETAIN ) { returnValue = seenInSubArray + ( index - rangeStart ) ; } else { returnValue = seenInSubArray ; } } self . _composeAt ( operationIndex ) ; } , function ( seenInSubArray ) { self . _operations . push ( new Operation ( itemType , 1 ) ) ; if ( match ) { returnValue = seenInSubArray ; } self . _composeAt ( self . _operations . length - 1 ) ; } ) ; return returnValue ; }