mirror of
https://github.com/status-im/react-native-randombytes.git
synced 2026-08-27 17:11:12 +00:00
now using some explicit req
This commit is contained in:
@@ -5,7 +5,8 @@ if (typeof Buffer === 'undefined') {
|
||||
var sjcl = require('sjcl');
|
||||
var sjclRandom = new sjcl.prng(10);
|
||||
|
||||
var RNRandomBytes = require('react-native').NativeModules.RNRandomBytes;
|
||||
var explicitReq = require;
|
||||
var RNRandomBytes = explicitReq('react-native').NativeModules.RNRandomBytes;
|
||||
|
||||
module.exports.randomBytes = function(length, cb) {
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"babelify": "mkdir -p browser && ./node_modules/.bin/browserify --exclude react-native -t [ babelify --presets [ react es2015 ] ] ./index.js | sed -e 's/require/bitgoReq/g' > ./browser/react_index.js"
|
||||
"babelify": "mkdir -p browser && ./node_modules/.bin/browserify --exclude react-native -t [ babelify --presets [ react es2015 ] ] ./index.js | sed -e 's/require/bitgoReq/g' | sed -e 's/explicitReq = bitgoReq/explicitReq = require/g' > ./browser/react_index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"react-component",
|
||||
|
||||
Reference in New Issue
Block a user