You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
500 B

import { Iterable, fromJS as _fromJS } from 'immutable';
import getIn from './getIn';
var structure = {
fromJS: function fromJS(jsValue) {
return _fromJS(jsValue, function (key, value) {
return Iterable.isIndexed(value) ? value.toList() : value.toMap();
});
},
getIn: getIn,
merge: function merge(state, payload) {
return state.merge(payload);
},
toJS: function toJS(value) {
return Iterable.isIterable(value) ? value.toJS() : value;
}
};
export default structure;