e2b28e7847
Co-authored-by: JW <gitkraken@juriwolf.de> Co-authored-by: Juri <info@juriwolf.de>
20 lines
534 B
TypeScript
20 lines
534 B
TypeScript
|
|
namespace pxsim.storage {
|
|
|
|
export function putValueInt(key: string, value: number) : void {
|
|
sessionStorage.setItem('simulatorValue_'+key, value+"");
|
|
}
|
|
|
|
export function getValueInt(key: string) : number {
|
|
if(sessionStorage.getItem('simulatorValue_'+key)) {
|
|
return parseFloat(sessionStorage.getItem('simulatorValue_'+key));
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
export function remove(key: string) : void {
|
|
sessionStorage.removeItem('simulatorValue_'+key);
|
|
}
|
|
|
|
} |