Skip to content

Recent

Persists the Dictionary hub's recent lookups (words and kanji) in localStorage, so the landing page can offer them back and the hub keeps a sense of state between visits.

Interfaces

RecentLookup

Defined in: src/features/dictionary/recent.ts:8

One remembered lookup.

Properties

Property Type Defined in
kind "word" | "kanji" src/features/dictionary/recent.ts:9
value string src/features/dictionary/recent.ts:10

Functions

getRecentLookups()

function getRecentLookups(): RecentLookup[];

Defined in: src/features/dictionary/recent.ts:21

Reads the recent lookups, most recent first.

Returns

RecentLookup[]

The remembered lookups (empty on parse failure).


pushRecentLookup()

function pushRecentLookup(item): void;

Defined in: src/features/dictionary/recent.ts:35

Remembers a lookup, de-duplicated and capped to the most recent few.

Parameters

Parameter Type Description
item RecentLookup The lookup to remember.

Returns

void