File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,6 +438,18 @@ export function getChars(countPartialLastWord = false): CharCounts {
438438 } ;
439439}
440440
441+ export function getInputHistory ( ) : string [ ] {
442+ const eventsPerWordIndex = getInputEventsPerWord ( ) ;
443+ const history : string [ ] = [ ] ;
444+
445+ for ( const events of eventsPerWordIndex . values ( ) ) {
446+ const simulatedInput = getSimulatedInput ( events ) ;
447+ history . push ( simulatedInput . trimEnd ( ) ) ;
448+ }
449+
450+ return history ;
451+ }
452+
441453export function getAccuracy ( ) : {
442454 correct : number ;
443455 incorrect : number ;
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ import {
106106 getCurrentAccuracy ,
107107 getCurrentTestDurationMs ,
108108 getDateBasedTestDurationMs ,
109+ getInputHistory ,
109110} from "./events/stats" ;
110111import { calculateWpm } from "../utils/numbers" ;
111112
@@ -922,6 +923,7 @@ export async function finish(difficultyFailed = false): Promise<void> {
922923 cleanupData ( ) ;
923924
924925 logEventsDataToTheConsoleTable ( ) ;
926+ console . log ( getInputHistory ( ) ) ;
925927
926928 const ce = buildCompletedEvent ( ) ;
927929 PaceCaret . setLastTestWpm ( ce . wpm ) ;
You can’t perform that action at this time.
0 commit comments