import R from "ramda" ; import * as SeamlessImmutable from "seamless-immutable" ; const isImmutable = R . has ( "asMutable" ) ; const convertToJs = ( state ) => state . asMutable ( { deep : true } ) ; const fromImmutable = R . when ( isImmutable , convertToJs ) ; const toImmutable = ( raw ) => SeamlessImmutable ( raw ) ; export default { out : ( state ) => { return toImmutable ( state ) ; } , in : ( raw ) => { return fromImmutable ( raw ) ; } , } ;