Roughing out the demo app
This commit is contained in:
14
node_modules/nanoid/async/random.rn.js
generated
vendored
Normal file
14
node_modules/nanoid/async/random.rn.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
var random
|
||||
try {
|
||||
random = require('expo-random')
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
'React-Native does not have a built-in secure random generator. ' +
|
||||
'Install `expo-random` locally or ' +
|
||||
'if you don’t need unpredictable IDs, you can use `nanoid/non-secure`.'
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = function (bytes) {
|
||||
return random.getRandomBytesAsync(bytes)
|
||||
}
|
||||
Reference in New Issue
Block a user