releasebird-javascript-sdk 1.0.15 → 1.0.17

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.
@@ -109,6 +109,10 @@ export default class RbirdSessionManager {
109
109
 
110
110
  }
111
111
 
112
+ logout() {
113
+ window.localStorage.removeItem('rbird_state');
114
+ }
115
+
112
116
  identifyUser(identify, hash) {
113
117
  let state = this.getState();
114
118
  state.identify.properties = identify;
package/src/index.js CHANGED
@@ -91,6 +91,14 @@ class Rbird {
91
91
  }
92
92
  }
93
93
 
94
+ static logout() {
95
+ try {
96
+ RbirdSessionManager.getInstance().logout();
97
+ } catch (e) {
98
+ console.error(e);
99
+ }
100
+ }
101
+
94
102
  }
95
103
 
96
104
  export const runFunctionWhenDomIsReady = (callback) => {