You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ The string returned from this package's single export function is literal JavaSc
20
20
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.
21
21
22
22
> [!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.
24
24
>
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.
26
26
>
27
27
> 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.
28
28
@@ -148,3 +148,5 @@ See the [LICENSE file][LICENSE] for license text and copyright information.
0 commit comments