Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

56 wiersze
1.6 KiB

  1. const entriesGetAll = {
  2. "count": 3,
  3. "next": null,
  4. "previous": null,
  5. "results": [{
  6. "id": "535a439d-49cf-4b32-844f-d367640a0a9b",
  7. "site": "facebook.com",
  8. "login": "test@lesspass.com",
  9. "password": {"counter": 1, "settings": ["lowercase", "uppercase", "numbers", "symbols"], "length": 12},
  10. "created": "2016-04-06T11:34:46.719242",
  11. "modified": "2016-04-06T11:34:46.719265"
  12. }, {
  13. "id": "a45b8a54-485f-4e8e-a03e-9d2ae169514c",
  14. "site": "twitter.com",
  15. "login": "test@lesspass.com",
  16. "password": {"counter": 10, "settings": ["lowercase", "uppercase", "numbers", "symbols"], "length": 14},
  17. "created": "2016-04-06T11:32:15.537767",
  18. "modified": "2016-04-06T11:33:46.951174"
  19. }, {
  20. "id": "d7fe3061-cb3b-492e-bc1e-b88c79acaa0c",
  21. "site": "lesspass.com",
  22. "login": "test@lesspass.com",
  23. "password": {"counter": 1, "settings": ["lowercase", "uppercase", "numbers", "symbols"], "length": 12},
  24. "created": "2016-04-06T11:27:49.962268",
  25. "modified": "2016-04-06T11:31:05.975255"
  26. }]
  27. };
  28. export {entriesGetAll};
  29. var entriesGetOne = JSON.parse(JSON.stringify(entriesGetAll.results[0]));
  30. export {entriesGetOne};
  31. function storageMock() {
  32. var storage = {};
  33. return {
  34. setItem: function (key, value) {
  35. storage[key] = value || '';
  36. },
  37. getItem: function (key) {
  38. return storage[key] || null;
  39. },
  40. removeItem: function (key) {
  41. delete storage[key];
  42. },
  43. get length() {
  44. return Object.keys(storage).length;
  45. },
  46. key: function (i) {
  47. var keys = Object.keys(storage);
  48. return keys[i] || null;
  49. }
  50. };
  51. }
  52. export {storageMock};