Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ In the case where devalued data is one part of a larger JSON string, `unflatten`
```js
import * as devalue from 'devalue';

const input = { message: 'hello' };
const json = `{
"type": "data",
"data": ${devalue.stringify(data)}
"data": ${devalue.stringify(input)}
}`;

const data = devalue.unflatten(JSON.parse(json).data);
const data = devalue.unflatten(JSON.parse(json).data); // { message: 'hello' }
```

### Binary data
Expand Down
Loading