Skip to content

Commit 9f8a730

Browse files
committedSep 9, 2020
feat: support expo>=39.0.0
Thanks to LinusU/react-native-get-random-values#13 Expo finally has support for a sync CSPRNG. Fixes #375
1 parent 7f1af04 commit 9f8a730

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
 

‎README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
1212
- Node 8, 10, 12, 14
1313
- Chrome, Safari, Firefox, Edge, IE 11 browsers
1414
- Webpack and rollup.js module bundlers
15-
- [React Native](#react-native)
15+
- [React Native / Expo](#react-native-expo)
1616
- **Secure** - Cryptographically-strong random values
1717
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
1818
- **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -405,7 +405,7 @@ Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`
405405

406406
This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:
407407

408-
### React Native
408+
### React Native / Expo
409409

410410
1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
411411
1. Import it before `uuid`:
@@ -415,6 +415,8 @@ import 'react-native-get-random-values';
415415
import { v4 as uuidv4 } from 'uuid';
416416
```
417417

418+
Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`.
419+
418420
### Web Workers / Service Workers (Edge <= 18)
419421

420422
[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please).

‎README_js.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
2424
- Node 8, 10, 12, 14
2525
- Chrome, Safari, Firefox, Edge, IE 11 browsers
2626
- Webpack and rollup.js module bundlers
27-
- [React Native](#react-native)
27+
- [React Native / Expo](#react-native-expo)
2828
- **Secure** - Cryptographically-strong random values
2929
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
3030
- **CLI** - Includes the [`uuid` command line](#command-line) utility
@@ -411,7 +411,7 @@ Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`
411411

412412
This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:
413413

414-
### React Native
414+
### React Native / Expo
415415

416416
1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
417417
1. Import it before `uuid`:
@@ -421,6 +421,8 @@ import 'react-native-get-random-values';
421421
import { v4 as uuidv4 } from 'uuid';
422422
```
423423

424+
Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`.
425+
424426
### Web Workers / Service Workers (Edge <= 18)
425427

426428
[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please).

0 commit comments

Comments
 (0)