shipping-rate-registry.js 623 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Copyright © Magento, Inc. All rights reserved.
  3. * See COPYING.txt for license details.
  4. */
  5. define([], function () {
  6. 'use strict';
  7. var cache = [];
  8. return {
  9. /**
  10. * @param {String} addressKey
  11. * @return {*}
  12. */
  13. get: function (addressKey) {
  14. if (cache[addressKey]) {
  15. return cache[addressKey];
  16. }
  17. return false;
  18. },
  19. /**
  20. * @param {String} addressKey
  21. * @param {*} data
  22. */
  23. set: function (addressKey, data) {
  24. cache[addressKey] = data;
  25. }
  26. };
  27. });