I’m not sure about you guys, but wouldn’t it be nice if we had a non-promise option to storage? I’m trying to move all my code away from localStorage so I don’t ever have to worry about losing tokens.
There’s times where I want to check if something exists, or assign something without a promise. For example;
rootPage:any = localStorage.getItem('token') ? : WelcomePage : LoginPage;
or
this.token = localStorage.getItem('token');
There’s other scenarios where this would be handy I’m sure.