@accounts/client
Advanced tools
Comparing version 0.0.4-alpha.98931215 to 0.0.4-alpha.392be48a
@@ -36,2 +36,4 @@ 'use strict'; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -63,6 +65,4 @@ | ||
this.store = (0, _createStore2.default)({ | ||
reducers: { | ||
accounts: _module2.default | ||
}, | ||
this.store = options.store || (0, _createStore2.default)({ | ||
reducers: _defineProperty({}, options.reduxStoreKey, _module2.default), | ||
middleware: middleware | ||
@@ -75,3 +75,9 @@ }); | ||
value: function getState() { | ||
return this.store.getState().get('accounts'); | ||
var state = this.store.getState(); | ||
if (typeof state.get === 'function') { | ||
return state.get(this.options.reduxStoreKey); | ||
} | ||
return state[this.options.reduxStoreKey]; | ||
} | ||
@@ -78,0 +84,0 @@ }, { |
@@ -22,3 +22,5 @@ 'use strict'; | ||
exports.default = _extends({}, _common.config, { | ||
store: null, | ||
reduxLogger: null, | ||
reduxStoreKey: 'accounts', | ||
server: '', | ||
@@ -25,0 +27,0 @@ localStoragePrefix: '', |
{ | ||
"name": "@accounts/client", | ||
"version": "0.0.4-alpha.98931215", | ||
"version": "0.0.4-alpha.392be48a", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -67,3 +67,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@accounts/common": "^0.0.4-alpha.98931215", | ||
"@accounts/common": "^0.0.4-alpha.392be48a", | ||
"immutable": "^3.8.1", | ||
@@ -70,0 +70,0 @@ "jwt-decode": "^2.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126606
2345