@open-tender/utils 0.4.15 → 0.4.16

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.
@@ -44,19 +44,19 @@ const makeDiscountServiceType = (serviceType) => {
44
44
  case 'DELIVERY':
45
45
  return 'Delivery only';
46
46
  default:
47
- return null;
47
+ return '';
48
48
  }
49
49
  };
50
50
  const makeDiscountOrderType = (orderType) => {
51
51
  switch (orderType) {
52
52
  case 'OLO':
53
- return null;
53
+ return '';
54
54
  case 'CATERING':
55
55
  return 'Catering only';
56
56
  case 'MERCH':
57
57
  return 'Merch only';
58
58
  default:
59
- return null;
59
+ return '';
60
60
  }
61
61
  };
62
62
  const makeChannelType = (channelType) => {
@@ -70,7 +70,7 @@ const makeChannelType = (channelType) => {
70
70
  case 'KIOSK':
71
71
  return 'Kiosk Only!';
72
72
  default:
73
- return null;
73
+ return '';
74
74
  }
75
75
  };
76
76
  const makeLimitations = (item) => {
@@ -78,8 +78,8 @@ const makeLimitations = (item) => {
78
78
  const serviceType = makeDiscountServiceType(service_type);
79
79
  const orderType = makeDiscountOrderType(order_type);
80
80
  const channelType = channel_type && makeChannelType(channel_type);
81
- const comma = serviceType && orderType ? ', ' : null;
82
- const dash = (serviceType || orderType) && channelType ? ' - ' : null;
81
+ const comma = serviceType && orderType ? ', ' : '';
82
+ const dash = (serviceType || orderType) && channelType ? ' - ' : '';
83
83
  if (serviceType || orderType || channelType) {
84
84
  return `
85
85
  ${serviceType}
@@ -40,19 +40,19 @@ const makeDiscountServiceType = (serviceType) => {
40
40
  case 'DELIVERY':
41
41
  return 'Delivery only';
42
42
  default:
43
- return null;
43
+ return '';
44
44
  }
45
45
  };
46
46
  const makeDiscountOrderType = (orderType) => {
47
47
  switch (orderType) {
48
48
  case 'OLO':
49
- return null;
49
+ return '';
50
50
  case 'CATERING':
51
51
  return 'Catering only';
52
52
  case 'MERCH':
53
53
  return 'Merch only';
54
54
  default:
55
- return null;
55
+ return '';
56
56
  }
57
57
  };
58
58
  const makeChannelType = (channelType) => {
@@ -66,7 +66,7 @@ const makeChannelType = (channelType) => {
66
66
  case 'KIOSK':
67
67
  return 'Kiosk Only!';
68
68
  default:
69
- return null;
69
+ return '';
70
70
  }
71
71
  };
72
72
  export const makeLimitations = (item) => {
@@ -74,8 +74,8 @@ export const makeLimitations = (item) => {
74
74
  const serviceType = makeDiscountServiceType(service_type);
75
75
  const orderType = makeDiscountOrderType(order_type);
76
76
  const channelType = channel_type && makeChannelType(channel_type);
77
- const comma = serviceType && orderType ? ', ' : null;
78
- const dash = (serviceType || orderType) && channelType ? ' - ' : null;
77
+ const comma = serviceType && orderType ? ', ' : '';
78
+ const dash = (serviceType || orderType) && channelType ? ' - ' : '';
79
79
  if (serviceType || orderType || channelType) {
80
80
  return `
81
81
  ${serviceType}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",