Skip to content

Commit

Permalink
Improved README
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed Nov 2, 2021
1 parent a4c8bd4 commit 2cbf0bb
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,20 @@ This module specialized `serialize` export offers, within the optional extra arg
```js
// as default export
import structuredClone from '@ungap/structured-clone';
const cloned = structuredClone({
method() {
// ignored, won't be cloned
const cloned = structuredClone(
{
method() {
// ignored, won't be cloned
},
special: Symbol('also ignored')
},
special: Symbol('also ignored')
});
{
// avoid throwing
lossy: true,
// avoid throwing *and* looks for toJSON
json: true
}
);
```

The behavior is the same found in *JSON* when it comes to *Array*, so that unsupported values will result as `null` placeholders instead.
Expand Down

0 comments on commit 2cbf0bb

Please sign in to comment.