nl_tokens: Iterates the cursor to which the provided Indexed DB request resolves . The method will iterate the cursor over the records in this storage within the range specified when the cursor was opened until the provided callback does not request iterating to the next record or the last matching record is reached .
pl_tokens: function iterateCursor ( request , cursorConstructor , recordCallback ) { return new PromiseSync ( ( resolve , reject ) => { let traversedRecords = 0 let canIterate = true <mask> . onerror = ( ) => reject ( request . error ) request . onsuccess = ( ) => { if ( ! canIterate ) { console . warn ( "Cursor iteration was requested asynchronously, " + "ignoring the new cursor position" ) return } if ( ! request . result ) { resolve ( traversedRecords ) return } traversedRecords ++ let iterationRequested = handleCursorIteration ( request , cursorConstructor , recordCallback , reject ) if ( ! iterationRequested ) { canIterate = false resolve ( traversedRecords ) } } } ) }