jail-monkey/index.js
Giovanni 04e660e650 Merge branch 'master' into feature/isDebugged
# Conflicts:
#	android/src/main/java/com/gantix/JailMonkey/JailMonkeyModule.java
2019-03-15 08:34:10 +01:00

20 lines
652 B
JavaScript

const react = require('react')
const rn = require('react-native')
let JailMonkey = null
// Detect location of native modules to support RN < 0.28
if (react.NativeModules && react.NativeModules.JailMonkey) {
JailMonkey = react.NativeModules.JailMonkey
} else {
JailMonkey = rn.NativeModules.JailMonkey
}
export default {
isJailBroken: () => JailMonkey.isJailBroken,
hookDetected: () => JailMonkey.hookDetected,
canMockLocation: () => JailMonkey.canMockLocation,
trustFall: () => JailMonkey.isJailBroken || JailMonkey.canMockLocation,
isOnExternalStorage: () => JailMonkey.isOnExternalStorage,
isDebugged: () => JailMonkey.isDebugged
}