Skip to content

Commit 12e7d07

Browse files
finish readme
1 parent 32d11e3 commit 12e7d07

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,15 @@ try {
230230

231231
## React Native
232232

233-
BSON requires the `atob`, `btoa` and `TextEncoder` globals. Old versions of React Native did not support these global objects. <TODO find versions>.
233+
js-bson requires the `atob`, `btoa` and `TextEncoder` globals. Older versions of React Native did not support these global objects, and so
234+
[js-bson v5.4.0](https://github.com/mongodb/js-bson/releases/tag/v5.4.0) added support for bundled polyfills for these globals. Newer versions
235+
of Hermes includes these globals, and so the polyfills for are no longer needed in the js-bson package.
234236

235237
If you find yourself on a version of React Native that does not have these globals, either:
236238

237239
1. polyfill them yourself
238-
2. use BSON 6.x
240+
2. upgrade to a later version of hermes
241+
3. use a version of js-bson `>=5.4.0` and `<7.0.0`
239242

240243
One additional polyfill, `crypto.getRandomValues` is recommended and can be installed with the following command:
241244

0 commit comments

Comments
 (0)