From e2b28e78478ff74912abffb30d1d209c9ac46015 Mon Sep 17 00:00:00 2001 From: Juri Wolf Date: Mon, 4 Apr 2022 18:52:34 +0200 Subject: [PATCH] fix storage functions (#174) Co-authored-by: JW Co-authored-by: Juri --- sim/state/storage.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sim/state/storage.ts b/sim/state/storage.ts index 92c7fa97..208c3972 100644 --- a/sim/state/storage.ts +++ b/sim/state/storage.ts @@ -1,22 +1,10 @@ namespace pxsim.storage { - export function putValue(key: string, value: string) : void { - sessionStorage.setItem('simulatorValue_'+key, value); - } - export function putValueInt(key: string, value: number) : void { sessionStorage.setItem('simulatorValue_'+key, value+""); } - export function getValue(key: string) : string { - if(sessionStorage.getItem('simulatorValue_'+key)) { - return sessionStorage.getItem('simulatorValue_'+key); - } else { - return ""; - } - } - export function getValueInt(key: string) : number { if(sessionStorage.getItem('simulatorValue_'+key)) { return parseFloat(sessionStorage.getItem('simulatorValue_'+key)); @@ -25,11 +13,7 @@ namespace pxsim.storage { } } - export function removeStr(key: string) : void { - sessionStorage.removeItem('simulatorValue_'+key); - } - - export function removeInt(key: string) : void { + export function remove(key: string) : void { sessionStorage.removeItem('simulatorValue_'+key); }