Skip to content

Commit cb95ca8

Browse files
committed
Referenceify links
1 parent c254b4c commit cb95ca8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ The string returned from this package's single export function is literal JavaSc
2020
Please note that serialization for ES6 Sets & Maps requires support for `Array.from` (not available in IE or Node < 0.12), or an `Array.from` polyfill.
2121

2222
> [!WARNING]
23-
> It may be tempting to use this package as a way to pass arbitrary functions into [worker threads](https://nodejs.org/api/worker_threads.html), since you cannot pass them directly via `postMessage()`. However, passing functions between worker threads is not possible in the general case. This package lets you serialize *some* functions, but it has limitations.
23+
> It may be tempting to use this package as a way to pass arbitrary functions into [worker threads][], since you cannot pass them directly via `postMessage()`. However, passing functions between worker threads is not possible in the general case. This package lets you serialize *some* functions, but it has limitations.
2424
>
25-
> For instance, if a function references something from outside the function body, it will not run properly if serialized and deserialized. This could include [closed-over variables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures) or imports from other packages. For a serialized function to run properly, it must be entirely self-contained.
25+
> For instance, if a function references something from outside the function body, it will not run properly if serialized and deserialized. This could include [closed-over variables][] or imports from other packages. For a serialized function to run properly, it must be entirely self-contained.
2626
>
2727
> In general, it is not possible to send arbitrary JavaScript to a worker thread, and pretend it's running the same way it would run on the main thread. This package doesn't let you do that.
2828
@@ -148,3 +148,5 @@ See the [LICENSE file][LICENSE] for license text and copyright information.
148148
[express-state]: https://github.com/yahoo/express-state
149149
[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
150150
[LICENSE]: https://github.com/yahoo/serialize-javascript/blob/main/LICENSE
151+
[worker threads]: https://nodejs.org/api/worker_threads.html
152+
[closed-over variables]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures

0 commit comments

Comments
 (0)