Skip to content

Instantly share code, notes, and snippets.

Last active January 18, 2023 09:53
What would you like to do?
simple storage management that doesn't handle concurrent access
const key = 'FORDEFI_data';
async function storeComplexData (complexData: Record<string, string[]>) {
await{[key]: complexData});
async function getComplexData () {
return (await[key]))?.[key];
async function getComplexDataItem (complexDataKey: string) {
const complexData = await getComplexData();
return complexData[complexDataKey];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment