Skip to content

Commit

Permalink
doc: add warning in stringyfyAsync
Browse files Browse the repository at this point in the history
Fixes: #27

PR-URL: #28
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
HarshithaKP committed Jun 23, 2020
1 parent 1765b6c commit 8dd7fa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ yj.stringifyAsync({key:"value"}, (err, data) => {
console.log(data)
})
```
Warning: While stringifyAsync is in progress (i.e. before the callback is executed), it is the user's responsibility to ensure that the Javascript object value (or any of its child objects) is not modified in any way. Object modification between the async function invocation and issuing of the completion callback may lead to undefined behavior (and can possibly result in an inadvertent crash or object corruption).
***parseAsync***:
parseAsync(text[, reviver][, intensity], callback)
Expand Down

0 comments on commit 8dd7fa4

Please sign in to comment.