Created
November 22, 2017 11:50
-
-
Save panoply/4c64b20e720832990a7b93d09cbf4114 to your computer and use it in GitHub Desktop.
Aysnc LocalStorage method. Use as Static fn waiting for localStorage value to be entered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static wait(key) { | |
return Promise | |
.resolve() | |
.then(() => { | |
return localStorage.getItem(key) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment