UNPKG

@vovkasm/redux-persist

Version:

persist and rehydrate redux stores

22 lines (15 loc) 883 B
'use strict'; exports.__esModule = true; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.default = isStatePlainEnough; var _isPlainObject = require('lodash/isPlainObject'); var _isPlainObject2 = _interopRequireDefault(_isPlainObject); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function isStatePlainEnough(a) { // isPlainObject + duck type not immutable if (!a) return false; if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) !== 'object') return false; if (typeof a.asMutable === 'function') return false; if (!(0, _isPlainObject2.default)(a)) return false; return true; }