@amplitude/analytics-react-native 0.3.1 → 0.3.2
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.
- package/lib/commonjs/utils/query-params.js +1 -1
- package/lib/commonjs/utils/query-params.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/utils/query-params.js +1 -1
- package/lib/module/utils/query-params.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/utils/query-params.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -7,7 +7,7 @@ exports.tryDecodeURIComponent = exports.getQueryParams = void 0;
|
|
|
7
7
|
|
|
8
8
|
const getQueryParams = () => {
|
|
9
9
|
/* istanbul ignore if */
|
|
10
|
-
if (typeof window === 'undefined') {
|
|
10
|
+
if (typeof window === 'undefined' || !window.location || !window.location.search) {
|
|
11
11
|
return {};
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getQueryParams","window","
|
|
1
|
+
{"version":3,"names":["getQueryParams","window","location","search","pairs","substring","split","filter","Boolean","params","reduce","acc","curr","query","key","tryDecodeURIComponent","value","decodeURIComponent"],"sources":["query-params.ts"],"sourcesContent":["export const getQueryParams = (): Record<string, string | undefined> => {\n /* istanbul ignore if */\n if (typeof window === 'undefined' || !window.location || !window.location.search) {\n return {};\n }\n const pairs = window.location.search.substring(1).split('&').filter(Boolean);\n const params = pairs.reduce<Record<string, string | undefined>>((acc, curr) => {\n const query = curr.split('=', 2);\n const key = tryDecodeURIComponent(query[0]);\n const value = tryDecodeURIComponent(query[1]);\n if (!value) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n return params;\n};\n\nexport const tryDecodeURIComponent = (value = '') => {\n try {\n return decodeURIComponent(value);\n } catch {\n return '';\n }\n};\n"],"mappings":";;;;;;;AAAO,MAAMA,cAAc,GAAG,MAA0C;EACtE;EACA,IAAI,OAAOC,MAAP,KAAkB,WAAlB,IAAiC,CAACA,MAAM,CAACC,QAAzC,IAAqD,CAACD,MAAM,CAACC,QAAP,CAAgBC,MAA1E,EAAkF;IAChF,OAAO,EAAP;EACD;;EACD,MAAMC,KAAK,GAAGH,MAAM,CAACC,QAAP,CAAgBC,MAAhB,CAAuBE,SAAvB,CAAiC,CAAjC,EAAoCC,KAApC,CAA0C,GAA1C,EAA+CC,MAA/C,CAAsDC,OAAtD,CAAd;EACA,MAAMC,MAAM,GAAGL,KAAK,CAACM,MAAN,CAAiD,CAACC,GAAD,EAAMC,IAAN,KAAe;IAC7E,MAAMC,KAAK,GAAGD,IAAI,CAACN,KAAL,CAAW,GAAX,EAAgB,CAAhB,CAAd;IACA,MAAMQ,GAAG,GAAGC,qBAAqB,CAACF,KAAK,CAAC,CAAD,CAAN,CAAjC;IACA,MAAMG,KAAK,GAAGD,qBAAqB,CAACF,KAAK,CAAC,CAAD,CAAN,CAAnC;;IACA,IAAI,CAACG,KAAL,EAAY;MACV,OAAOL,GAAP;IACD;;IACDA,GAAG,CAACG,GAAD,CAAH,GAAWE,KAAX;IACA,OAAOL,GAAP;EACD,CATc,EASZ,EATY,CAAf;EAUA,OAAOF,MAAP;AACD,CAjBM;;;;AAmBA,MAAMM,qBAAqB,GAAG,YAAgB;EAAA,IAAfC,KAAe,uEAAP,EAAO;;EACnD,IAAI;IACF,OAAOC,kBAAkB,CAACD,KAAD,CAAzB;EACD,CAFD,CAEE,MAAM;IACN,OAAO,EAAP;EACD;AACF,CANM"}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.
|
|
1
|
+
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.2';\n"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAG,OAAhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getQueryParams","window","
|
|
1
|
+
{"version":3,"names":["getQueryParams","window","location","search","pairs","substring","split","filter","Boolean","params","reduce","acc","curr","query","key","tryDecodeURIComponent","value","decodeURIComponent"],"sources":["query-params.ts"],"sourcesContent":["export const getQueryParams = (): Record<string, string | undefined> => {\n /* istanbul ignore if */\n if (typeof window === 'undefined' || !window.location || !window.location.search) {\n return {};\n }\n const pairs = window.location.search.substring(1).split('&').filter(Boolean);\n const params = pairs.reduce<Record<string, string | undefined>>((acc, curr) => {\n const query = curr.split('=', 2);\n const key = tryDecodeURIComponent(query[0]);\n const value = tryDecodeURIComponent(query[1]);\n if (!value) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n return params;\n};\n\nexport const tryDecodeURIComponent = (value = '') => {\n try {\n return decodeURIComponent(value);\n } catch {\n return '';\n }\n};\n"],"mappings":"AAAA,OAAO,MAAMA,cAAc,GAAG,MAA0C;EACtE;EACA,IAAI,OAAOC,MAAP,KAAkB,WAAlB,IAAiC,CAACA,MAAM,CAACC,QAAzC,IAAqD,CAACD,MAAM,CAACC,QAAP,CAAgBC,MAA1E,EAAkF;IAChF,OAAO,EAAP;EACD;;EACD,MAAMC,KAAK,GAAGH,MAAM,CAACC,QAAP,CAAgBC,MAAhB,CAAuBE,SAAvB,CAAiC,CAAjC,EAAoCC,KAApC,CAA0C,GAA1C,EAA+CC,MAA/C,CAAsDC,OAAtD,CAAd;EACA,MAAMC,MAAM,GAAGL,KAAK,CAACM,MAAN,CAAiD,CAACC,GAAD,EAAMC,IAAN,KAAe;IAC7E,MAAMC,KAAK,GAAGD,IAAI,CAACN,KAAL,CAAW,GAAX,EAAgB,CAAhB,CAAd;IACA,MAAMQ,GAAG,GAAGC,qBAAqB,CAACF,KAAK,CAAC,CAAD,CAAN,CAAjC;IACA,MAAMG,KAAK,GAAGD,qBAAqB,CAACF,KAAK,CAAC,CAAD,CAAN,CAAnC;;IACA,IAAI,CAACG,KAAL,EAAY;MACV,OAAOL,GAAP;IACD;;IACDA,GAAG,CAACG,GAAD,CAAH,GAAWE,KAAX;IACA,OAAOL,GAAP;EACD,CATc,EASZ,EATY,CAAf;EAUA,OAAOF,MAAP;AACD,CAjBM;AAmBP,OAAO,MAAMM,qBAAqB,GAAG,YAAgB;EAAA,IAAfC,KAAe,uEAAP,EAAO;;EACnD,IAAI;IACF,OAAOC,kBAAkB,CAACD,KAAD,CAAzB;EACD,CAFD,CAEE,MAAM;IACN,OAAO,EAAP;EACD;AACF,CANM"}
|
package/lib/module/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.2';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.
|
|
1
|
+
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["export const VERSION = '0.3.2';\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,OAAhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
1
|
+
export declare const VERSION = "0.3.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Official React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"analytics",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
]
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "fba2800b35e8f78428d94c64603e344034d44d1e"
|
|
93
93
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const getQueryParams = (): Record<string, string | undefined> => {
|
|
2
2
|
/* istanbul ignore if */
|
|
3
|
-
if (typeof window === 'undefined') {
|
|
3
|
+
if (typeof window === 'undefined' || !window.location || !window.location.search) {
|
|
4
4
|
return {};
|
|
5
5
|
}
|
|
6
6
|
const pairs = window.location.search.substring(1).split('&').filter(Boolean);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.2';
|