UNPKG

456 BJavaScriptView Raw
1// @flow
2
3import {
4 NativeModules,
5} from 'react-native';
6
7// On Android we pass the manifest in JSON form so this step is necessary
8let { ExponentConstants } = NativeModules;
9
10let manifest;
11if (ExponentConstants && ExponentConstants.manifest) {
12 manifest = NativeModules.ExponentConstants.manifest;
13 if (typeof manifest === 'string') {
14 manifest = JSON.parse(manifest);
15 }
16}
17
18module.exports = {
19 ...NativeModules.ExponentConstants,
20 manifest,
21};