Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. class StoreSingleton {
  2. constructor() {
  3. this._data = 'Leffe';
  4. this._date = new Date()
  5. }
  6.  
  7. singletonMethod() {
  8. return 'singletonMethod';
  9. }
  10.  
  11. static staticMethod() {
  12. return 'staticMethod';
  13. }
  14.  
  15. get data() {
  16. return this._data;
  17. }
  18.  
  19. set data(value) {
  20. this._data = value;
  21. }
  22.  
  23. get date() {
  24. return this._date;
  25. }
  26. }
  27.  
  28. export default new StoreSingleton();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement