mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-14 21:56:55 +03:00
ad281ba07a
* Add remotedev-serialize package * Update
24 lines
590 B
JavaScript
24 lines
590 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
|
|
};
|
|
};
|