@sentiance-react-native/legacy 6.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ import {NativeModules, Platform} from 'react-native'
2
+ import {varToString} from '@sentiance-react-native/core/lib/utils'
3
+
4
+ const {RNSentiance, SentianceCore} = NativeModules;
5
+
6
+ var legacyModule
7
+ if (Platform.OS === 'ios') {
8
+ if (!SentianceCore) {
9
+ const nativeModuleName = varToString({SentianceCore});
10
+ throw `Could not locate the native ${nativeModuleName} module.
11
+ Make sure that your native code is properly linked, and that the module name you specified is correct.`;
12
+ }
13
+ legacyModule = SentianceCore
14
+ } else {
15
+ if (!RNSentiance) {
16
+ const nativeModuleName = varToString({RNSentiance});
17
+ throw `Could not locate the native ${nativeModuleName} module.
18
+ Make sure that your native code is properly linked, and that the module name you specified is correct.`;
19
+ }
20
+ legacyModule = RNSentiance
21
+ }
22
+
23
+ export default legacyModule
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@sentiance-react-native/legacy",
3
+ "version": "6.0.0-beta.9",
4
+ "description": "React Native Sentiance - This module provides a legacy API.",
5
+ "main": "lib/index.js",
6
+ "typings": "lib/index.d.ts",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "lint": "npx eslint lib/index.d.ts"
10
+ },
11
+ "keywords": [
12
+ "react-native",
13
+ "legacy",
14
+ "sentiance"
15
+ ],
16
+ "peerDependencies": {
17
+ "@sentiance-react-native/crash-detection": "6.0.0-beta.9"
18
+ },
19
+ "author": "",
20
+ "license": "",
21
+ "homepage": "https://github.com/sentiance/react-native-sentiance/legacy#readme",
22
+ "repository": "github:sentiance/react-native-sentiance",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ }
26
+ }