@saasquatch/squatch-js 2.3.1-2 → 2.3.1-6

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.
@@ -1,14 +1,14 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "demo/dist",
4
- "sourceMap": true,
5
- "noImplicitAny": false,
6
- "allowSyntheticDefaultImports": true,
7
- "strictNullChecks": true,
8
- "module": "commonjs",
9
- "target": "es5",
10
- "allowJs": true,
11
- "jsx": "react",
12
- "lib": ["es2015", "dom", "es5", "scripthost"]
13
- }
14
- }
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "demo/dist",
4
+ "sourceMap": true,
5
+ "noImplicitAny": false,
6
+ "allowSyntheticDefaultImports": true,
7
+ "strictNullChecks": true,
8
+ "module": "commonjs",
9
+ "target": "es5",
10
+ "allowJs": true,
11
+ "jsx": "react",
12
+ "lib": ["es2015", "dom", "es5", "scripthost"]
13
+ }
14
+ }
package/demo/util.ts CHANGED
@@ -1,22 +1,22 @@
1
- export function getQueryStringParams(query) {
2
- return query
3
- ? (/^[?#]/.test(query) ? query.slice(1) : query)
4
- .split("&")
5
- .reduce((params, param) => {
6
- let [key, value] = param.split("=");
7
- params[key] = value
8
- ? decodeURIComponent(value.replace(/\+/g, " "))
9
- : "";
10
- return params;
11
- }, {})
12
- : {};
13
- }
14
-
15
-
16
- export function delay (duration) {
17
- return new Promise(function(resolve, reject){
18
- setTimeout(function(){
19
- resolve();
20
- }, duration)
21
- })
1
+ export function getQueryStringParams(query) {
2
+ return query
3
+ ? (/^[?#]/.test(query) ? query.slice(1) : query)
4
+ .split("&")
5
+ .reduce((params, param) => {
6
+ let [key, value] = param.split("=");
7
+ params[key] = value
8
+ ? decodeURIComponent(value.replace(/\+/g, " "))
9
+ : "";
10
+ return params;
11
+ }, {})
12
+ : {};
13
+ }
14
+
15
+
16
+ export function delay (duration) {
17
+ return new Promise(function(resolve, reject){
18
+ setTimeout(function(){
19
+ resolve();
20
+ }, duration)
21
+ })
22
22
  }
package/demo/versions.ts CHANGED
@@ -1,14 +1,14 @@
1
- export async function getVersions(): Promise<string[]> {
2
- const headers = {
3
- Origin: "google.com",
4
- "X-Requested-With":
5
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
6
- };
7
-
8
- const response = await fetch(
9
- "https://cors-anywhere.herokuapp.com/https://registry.npmjs.org/@saasquatch/squatch-js",
10
- {}
11
- );
12
- const body = await response.json();
13
- return Object.keys(body.versions).reverse();
14
- }
1
+ export async function getVersions(): Promise<string[]> {
2
+ const headers = {
3
+ Origin: "google.com",
4
+ "X-Requested-With":
5
+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
6
+ };
7
+
8
+ const response = await fetch(
9
+ "https://cors-anywhere.herokuapp.com/https://registry.npmjs.org/@saasquatch/squatch-js",
10
+ {}
11
+ );
12
+ const body = await response.json();
13
+ return Object.keys(body.versions).reverse();
14
+ }
@@ -42,7 +42,7 @@ export default class EventsApi {
42
42
  * Track an event for a user
43
43
  *
44
44
  * @param params Parameters for request
45
- * @param params.jwt the JSON Web Token (JWT) that is used to authenticate the user
45
+ * @param options.jwt the JSON Web Token (JWT) that is used to authenticate the user
46
46
  *
47
47
  * @return An ID to confirm the event has been accepted for asynchronous processing
48
48
  */