Skip to content

Instantly share code, notes, and snippets.

View darioriverat's full-sized avatar

Darío Rivera darioriverat

View GitHub Profile
@darioriverat
darioriverat / config.js
Last active March 8, 2022 03:04
Some class to get user Config from API in a browser
class Config {
endpoint = 'https://somewebsite.com/config';
constructor(userId) {
this.userId = userId;
}
async getValueFor(key) {
if (this.data) {
// getting from cache