@capillarytech/cap-ui-utils 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as Auth } from './auth';
2
2
  export { default as GA } from './GA';
3
3
  export { default as multipleOrgSwitch } from './utils/multipleOrgSwitch';
4
- export * as utilsSessionStorageApi from './utils/utilsSessionStorageApi';
4
+ export { default as utilsSessionStorageApi } from './utils/utilsSessionStorageApi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,4 @@
1
- export const loadSessionItem = (key, BugsnagClient) => {
1
+ const loadSessionItem = (key, BugsnagClient) => {
2
2
  try {
3
3
  const serializedState = sessionStorage.getItem(key);
4
4
  if (serializedState === null) {
@@ -11,7 +11,7 @@ export const loadSessionItem = (key, BugsnagClient) => {
11
11
  }
12
12
  };
13
13
 
14
- export const saveSessionItem = (key, value, BugsnagClient) => {
14
+ const saveSessionItem = (key, value, BugsnagClient) => {
15
15
  try {
16
16
  const serializedState = JSON.stringify(value);
17
17
  sessionStorage.setItem(key, serializedState);
@@ -21,7 +21,7 @@ export const saveSessionItem = (key, value, BugsnagClient) => {
21
21
  }
22
22
  };
23
23
 
24
- export const clearSessionItem = (key, BugsnagClient) => {
24
+ const clearSessionItem = (key, BugsnagClient) => {
25
25
  try {
26
26
  sessionStorage.removeItem(key);
27
27
  return true;
@@ -30,3 +30,9 @@ export const clearSessionItem = (key, BugsnagClient) => {
30
30
  return false;
31
31
  }
32
32
  };
33
+
34
+ module.exports = {
35
+ loadSessionItem,
36
+ saveSessionItem,
37
+ clearSessionItem
38
+ }