Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Nanoid | 22,015 | 10,522 | 7,084 | 17 days ago | 94 | November 06, 2023 | 6 | mit | JavaScript | |
A tiny (109 bytes), secure, URL-friendly, unique string ID generator for JavaScript | ||||||||||
React Native Get Random Values | 303 | 1 | 187 | 10 days ago | 16 | November 20, 2023 | 12 | mit | JavaScript | |
A small implementation of `getRandomValues` for React Native | ||||||||||
Sparticles | 166 | 1 | a year ago | 23 | December 20, 2021 | 8 | mpl-2.0 | JavaScript | ||
JavaScript Particles in Canvas ~~ Fast, Lightweight, High Performance. | ||||||||||
Random Gradient | 65 | 3 | 1 | a year ago | 2 | June 08, 2017 | 13 | mit | JavaScript | |
Generate beautiful random gradients | ||||||||||
Affirmation_generator | 47 | 3 years ago | 2 | JavaScript | ||||||
A random affirmation generator written with ReactJS :-) | ||||||||||
Advanced Passgen | 39 | 5 days ago | 1 | gpl-3.0 | JavaScript | |||||
Advanced Password Generator | ||||||||||
Random Music Generators | 36 | a year ago | 1 | other | ||||||
Random chord, melody, and rhythm generators with MIDI output | ||||||||||
Bigint Crypto Utils | 30 | 5 months ago | mit | JavaScript | ||||||
Utils for working with cryptography using native JS implementation of BigInt. It includes arbitrary precision modular arithmetics, cryptographically secure random numbers and strong probable prime generation/testing. It works with Node.js, and native JS, including React and Angular | ||||||||||
React Lorem Ipsum | 28 | 8 | 5 | 2 years ago | 27 | February 11, 2022 | 3 | mit | JavaScript | |
Lorem Ipsum Text Generator for React | ||||||||||
Evernote Random | 26 | 4 years ago | 24 | other | JavaScript | |||||
Use evernote API as a logged-in user - react and express project |
crypto.getRandomValues
for React NativeA small implementation of crypto.getRandomValues
for React Native. This is useful to polyfill for libraries like uuid that depend on it.
npm install react-native-get-random-values
npx pod-install
If you use the Expo managed workflow you will see "CocoaPods is not supported in this project" - this is fine, it's not necessary.
This library works as a polyfill for the global crypto.getRandomValues
.
// Add this line to your `index.js`
import 'react-native-get-random-values'
Now you can use uuid
or other libraries that assume crypto.getRandomValues
is available.
import { v4 as uuid } from 'uuid'
console.log(uuid())
crypto.getRandomValues(typedArray)
The crypto.getRandomValues()
method lets you get cryptographically strong random values. The array given as the parameter is filled with random numbers (random in its cryptographic meaning).
To guarantee enough performance, implementations are not using a truly random number generator, but they are using a pseudo-random number generator seeded with a value with enough entropy. The PRNG used differs from one implementation to the other but is suitable for cryptographic usages. Implementations are also required to use a seed with enough entropy, like a system-level entropy source.
typedArray
- Is an integer-based TypedArray, that is an Int8Array
, a Uint8Array
, an Int16Array
, a Uint16Array
, an Int32Array
, or a Uint32Array
. All elements in the array are going to be overridden with random numbers.Returns the typed array that was passed in.