Skip to content

Commit 3788f21

Browse files
committed
fix method name in docs
1 parent 822af20 commit 3788f21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/serialization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ console.log(crossSerialize(nodeA, { refs })); // ($R[0]={next:$R[1]={}},$R[1].pr
104104
console.log(crossSerialize(nodeB, { refs })); // $R[1]
105105
```
106106

107-
Take note that cross-reference scripts relies on the global array variable `$R`, which you can declare either manually, or a script via `getLocalHeaderScript`
107+
Take note that cross-reference scripts relies on the global array variable `$R`, which you can declare either manually, or a script via `getCrossReferenceHeader`
108108

109109
```js
110110
import { getCrossReferenceHeader } from 'seroval';
@@ -174,7 +174,7 @@ Streaming serialization allows pushing values through `Promise` instances. Howev
174174

175175
`ReadableStream` is capable of doing so, however it's not a JS standard (`seroval` supports it through plugins). `Observable` could have been nice however [it's not a JS standard yet](https://github.com/tc39/proposal-observable)
176176

177-
With two of the optinos not available, `seroval` provides a streaming primitive called `createStream` which is capable of buffering streaming data as well as emitting pushed data.
177+
With two of the options not available, `seroval` provides a streaming primitive called `createStream` which is capable of buffering streaming data as well as emitting pushed data.
178178

179179
```js
180180
import { createStream } from 'seroval';
@@ -229,7 +229,7 @@ $R[0].return("baz")
229229

230230
## JSON serialization
231231

232-
The mentioned serialization metohds are ideal for server-to-client communication, however, client-to-server communication requires a sanitized data, because the medium is prone to [RCE](https://huntr.dev/bounties/63f1ff91-48f3-4886-a179-103f1ddd8ff8). `seroval` offers JSON modes as an alternative.
232+
The mentioned serialization methods are ideal for server-to-client communication, however, client-to-server communication requires a sanitized data, because the medium is prone to [RCE](https://huntr.dev/bounties/63f1ff91-48f3-4886-a179-103f1ddd8ff8). `seroval` offers JSON modes as an alternative.
233233

234234
| modes | JS | JSON |
235235
| --- | --- | --- |

0 commit comments

Comments
 (0)