mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
serialize
This commit is contained in:
parent
e1a9148b67
commit
9fd6beb28e
|
@ -39,6 +39,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@redux-devtools/core": "^3.7.0",
|
"@redux-devtools/core": "^3.7.0",
|
||||||
"@redux-devtools/log-monitor": "^2.1.0",
|
"@redux-devtools/log-monitor": "^2.1.0",
|
||||||
|
"@redux-devtools/serialize": "^0.2.0",
|
||||||
"d3-state-visualizer": "^1.3.4",
|
"d3-state-visualizer": "^1.3.4",
|
||||||
"devui": "^1.0.0-6",
|
"devui": "^1.0.0-6",
|
||||||
"get-params": "^0.1.2",
|
"get-params": "^0.1.2",
|
||||||
|
@ -58,7 +59,6 @@
|
||||||
"redux-devtools-inspector-monitor": "^0.14.0",
|
"redux-devtools-inspector-monitor": "^0.14.0",
|
||||||
"redux-devtools-inspector-monitor-test-tab": "^0.6.2",
|
"redux-devtools-inspector-monitor-test-tab": "^0.6.2",
|
||||||
"redux-devtools-inspector-monitor-trace-tab": "^0.1.3",
|
"redux-devtools-inspector-monitor-trace-tab": "^0.1.3",
|
||||||
"redux-devtools-serialize": "^0.2.0",
|
|
||||||
"redux-devtools-slider-monitor": "^2.0.0-5",
|
"redux-devtools-slider-monitor": "^2.0.0-5",
|
||||||
"redux-persist": "^4.10.2",
|
"redux-persist": "^4.10.2",
|
||||||
"socketcluster-client": "^14.3.1",
|
"socketcluster-client": "^14.3.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import mapValues from 'lodash/mapValues';
|
import mapValues from 'lodash/mapValues';
|
||||||
import jsan from 'jsan';
|
import jsan from 'jsan';
|
||||||
import { immutableSerialize } from 'redux-devtools-serialize';
|
import { immutableSerialize } from '@redux-devtools/serialize';
|
||||||
import { Action } from 'redux';
|
import { Action } from 'redux';
|
||||||
import Immutable from 'immutable';
|
import Immutable from 'immutable';
|
||||||
import { State } from '../app/reducers/instances';
|
import { State } from '../app/reducers/instances';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import getParams from 'get-params';
|
import getParams from 'get-params';
|
||||||
import jsan from 'jsan';
|
import jsan from 'jsan';
|
||||||
import { nanoid } from 'nanoid/non-secure';
|
import { nanoid } from 'nanoid/non-secure';
|
||||||
import { immutableSerialize } from 'redux-devtools-serialize';
|
import { immutableSerialize } from '@redux-devtools/serialize';
|
||||||
import Immutable from 'immutable';
|
import Immutable from 'immutable';
|
||||||
import { Action } from 'redux';
|
import { Action } from 'redux';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn add redux-devtools-serialize
|
yarn add @redux-devtools/serialize
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage with ImmutableJS data structures
|
### Usage with ImmutableJS data structures
|
||||||
|
@ -12,7 +12,7 @@ Just pass the Immutable library to our class:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Immutable from 'immutable';
|
import Immutable from 'immutable';
|
||||||
import Serialize from 'redux-devtools-serialize';
|
import Serialize from '@redux-devtools/serialize';
|
||||||
const { stringify, parse } = Serialize.immutable(Immutable);
|
const { stringify, parse } = Serialize.immutable(Immutable);
|
||||||
|
|
||||||
const data = Immutable.fromJS({ foo: 'bar', baz: { qux: 42 } });
|
const data = Immutable.fromJS({ foo: 'bar', baz: { qux: 42 } });
|
||||||
|
@ -32,7 +32,7 @@ To parse a Record class back, you need to specify a reference to it:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Immutable from 'immutable';
|
import Immutable from 'immutable';
|
||||||
import Serialize from 'redux-devtools-serialize';
|
import Serialize from '@redux-devtools/serialize';
|
||||||
|
|
||||||
const ABRecord = Immutable.Record({ a: 1, b: 2 });
|
const ABRecord = Immutable.Record({ a: 1, b: 2 });
|
||||||
const { stringify, parse } = Serialize.immutable(Immutable, [ABRecord]);
|
const { stringify, parse } = Serialize.immutable(Immutable, [ABRecord]);
|
||||||
|
@ -52,7 +52,7 @@ You can pass custom replacer and reviver functions to Serialize:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import Immutable from 'immutable';
|
import Immutable from 'immutable';
|
||||||
import Serialize from 'redux-devtools-serialize';
|
import Serialize from '@redux-devtools/serialize';
|
||||||
|
|
||||||
function customReplacer(key, value, defaultReplacer) {
|
function customReplacer(key, value, defaultReplacer) {
|
||||||
if (value === 1) {
|
if (value === 1) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "redux-devtools-serialize",
|
"name": "@redux-devtools/serialize",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"description": "Serialize unserializable data and parse it back.",
|
"description": "Serialize unserializable data and parse it back.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user