tripstorekrabi-shared 1.7.4 → 1.7.7
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/package.json +2 -2
- package/utils.js +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tripstorekrabi-shared",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "Shared library for Trip Store Krabi",
|
|
5
5
|
"author": "Stefan Sommer <tonprince@gmail.com>",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"./availability": "./availability.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"dayjs": "^1.11.
|
|
16
|
+
"dayjs": "^1.11.5"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"deploy": "npm publish"
|
package/utils.js
CHANGED
|
@@ -277,18 +277,6 @@ export function countPeople(people) {
|
|
|
277
277
|
return people.adults ?? 0 + people.children ?? 0 + people.infants ?? 0;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
export function recaptchaChallenge(secret, token) {
|
|
281
|
-
const url = `https://www.google.com/recaptcha/api/siteverify?secret=${secret}&response=${token}`;
|
|
282
|
-
return fetch(url, {
|
|
283
|
-
method: "POST",
|
|
284
|
-
}).then(async (result) => result.json())
|
|
285
|
-
.then((result) => result.success
|
|
286
|
-
).catch((e) => {
|
|
287
|
-
console.error(e);
|
|
288
|
-
return false
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
|
|
292
280
|
export function isNumeric(n) {
|
|
293
281
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
|
294
282
|
}
|