Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateioprea/react-native-random-values-jsi-helper
https://github.com/mateioprea/react-native-random-values-jsi-helper
javascript react-native
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mateioprea/react-native-random-values-jsi-helper
- Owner: mateioprea
- License: mit
- Created: 2022-01-25T07:46:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T13:51:45.000Z (about 1 year ago)
- Last Synced: 2024-10-28T02:41:42.784Z (14 days ago)
- Topics: javascript, react-native
- Language: C++
- Homepage:
- Size: 209 KB
- Stars: 36
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-random-values-jsi-helper
React Native polyfill for crypto.getRandomValues. Used in libraries like [uuid](https://www.npmjs.com/package/uuid).
## Installation
React Native 0.71.0 or higher:
```sh
yarn add react-native-random-values-jsi-helper
npx pod-install
```React Native < 0.71:
```sh
yarn add [email protected]
npx pod-install
```## Usage
Import ```react-native-random-values-jsi-helper``` in your index.js file.
```js
//index.js
import "react-native-random-values-jsi-helper";
```You can now use the [uuid](https://www.npmjs.com/package/uuid) package in your React Native app.
## Performance
This module is written in C++ JSI.
Basically there is no over the bridge traffic overhead and no serialization/deserialization since the random arrays are generated on native side.
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
## Acknowledgements
[@mrousavy](https://github.com/mrousavy)
[@expo](https://github.com/expo/expo)
## Other projects
[react-native-get-random-values](https://github.com/LinusU/react-native-get-random-values)