Created
April 20, 2017 20:58
-
-
Save augustovictor/81940617534d24a1d220a1fb3a23b7f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 'use strict'; | |
| class FetchDataManagerSingleton extends Map { | |
| static get [Symbol.species]() { | |
| return Map; | |
| } | |
| constructor() { | |
| this.fetchCount = 0; | |
| this.timeTilNextFetch = 5000; | |
| } | |
| static updateTimeTilNextFetch(newValue) { | |
| this.timeTilNextFetch = newValue; | |
| } | |
| show() { | |
| console.log(this.entries()); | |
| } | |
| } | |
| module.exports = new FetchDataManagerSingleton(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment