tripstorekrabi-shared 1.16.0 → 1.16.1
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 +1 -1
- package/utils.js +0 -10
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -28,7 +28,6 @@ export const TIQ_AGENCYID_IN_PHAYUN = 'HPiO2Z6OdD8A3O5Zbi96';
|
|
|
28
28
|
const EMAIL_PATTERN = new RegExp(
|
|
29
29
|
/^[a-zA-Z0-9.!#$%&' * +/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
|
|
30
30
|
);
|
|
31
|
-
const MEALS = ['lunch', 'meal', 'breakfast', 'dinner'];
|
|
32
31
|
const SCHEDULE_PATTERN = new RegExp('^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$');
|
|
33
32
|
|
|
34
33
|
export function validateEmail(email) {
|
|
@@ -223,15 +222,6 @@ export function isTrainStation(value) {
|
|
|
223
222
|
return value.includes('train') && value.includes('station');
|
|
224
223
|
}
|
|
225
224
|
|
|
226
|
-
export function isMealIncluded(includes) {
|
|
227
|
-
if (includes) {
|
|
228
|
-
let includesString = includes.join(' ').toLowerCase();
|
|
229
|
-
return MEALS.some((item) => includesString.includes(item));
|
|
230
|
-
} else {
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
225
|
export function validateName(name) {
|
|
236
226
|
name = name.trim();
|
|
237
227
|
if (name) {
|