redux-devtools/packages/remotedev-serialize/immutable/index.js
Nathan Bierema 10bf7bc084
chore(*): upgrade prettier (#570)
* chore(*): upgrade prettier

* chore(*): upgrade prettier
2020-08-08 16:26:39 -04:00

24 lines
594 B
JavaScript

var jsan = require('jsan');
var serialize = require('./serialize');
var options = require('../constants/options');
module.exports = function (Immutable, refs, customReplacer, customReviver) {
return {
stringify: function (data) {
return jsan.stringify(
data,
serialize(Immutable, refs, customReplacer, customReviver).replacer,
null,
options
);
},
parse: function (data) {
return jsan.parse(
data,
serialize(Immutable, refs, customReplacer, customReviver).reviver
);
},
serialize: serialize,
};
};