tripstorekrabi-shared 1.16.7 → 1.16.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils.js +16 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.16.7",
3
+ "version": "1.16.9",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/utils.js CHANGED
@@ -164,23 +164,35 @@ export function getArrival(schedule) {
164
164
  return schedule.split('-')[1].trim();
165
165
  }
166
166
 
167
+ export function isVillaAirbnb(value) {
168
+ value = value.toLowerCase();
169
+ return (
170
+ (value.includes('picked up') ||
171
+ value.includes('pickup') ||
172
+ value.includes('round-trip')) && (
173
+ value.includes("villa") || value.includes("airbnb"))
174
+ );
175
+ }
176
+
167
177
  export function isHotelPickup(value) {
168
178
  value = value.toLowerCase();
169
179
  return (
170
180
  (value.includes('picked up') ||
171
181
  value.includes('pickup') ||
172
- value.includes('round-trip')) &&
173
- value.includes('hotel')
182
+ value.includes('round-trip')) && (
183
+ value.includes('hotel') || value.includes("villa") || value.includes("airbnb"))
174
184
  );
175
185
  }
176
186
 
187
+
188
+
177
189
  export function isHotelDropOff(value) {
178
190
  value = value.toLowerCase();
179
191
  return (
180
192
  (value.includes('dropped off') ||
181
193
  value.includes('drop-off') ||
182
- value.includes('transfer')) &&
183
- value.includes('hotel')
194
+ value.includes('transfer')) && (
195
+ value.includes('hotel') || value.includes("villa") || value.includes("airbnb"))
184
196
  );
185
197
  }
186
198