lazywait-calcs 1.0.9 → 1.1.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/lib/cjs/Calcs.js CHANGED
@@ -208,7 +208,7 @@ function Deliveries(order_deliveries) {
208
208
  let sum = 0;
209
209
  if (order_deliveries) {
210
210
  (order_deliveries || []).forEach((d) => {
211
- if (d.delivery_type === 'RADIUS') {
211
+ if ((d === null || d === void 0 ? void 0 : d.delivery_type) === 'RADIUS') {
212
212
  sum += (d.delivery_fee || 0) * (d.delivery_radius || 1);
213
213
  }
214
214
  else {
package/lib/cjs/index.js CHANGED
@@ -22,8 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
25
28
  Object.defineProperty(exports, "__esModule", { value: true });
26
29
  exports.Types = exports.Setters = exports.Calcs = void 0;
27
30
  exports.Calcs = __importStar(require("./Calcs"));
28
31
  exports.Setters = __importStar(require("./setters"));
29
32
  exports.Types = __importStar(require("./types"));
33
+ __exportStar(require("./types"), exports);
@@ -1,4 +1,5 @@
1
1
  export * as Calcs from './Calcs';
2
2
  export * as Setters from './setters';
3
3
  export * as Types from './types';
4
+ export * from './types';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,SAAS,CAAC"}
package/lib/esm/Calcs.js CHANGED
@@ -183,7 +183,7 @@ export function Deliveries(order_deliveries) {
183
183
  let sum = 0;
184
184
  if (order_deliveries) {
185
185
  (order_deliveries || []).forEach((d) => {
186
- if (d.delivery_type === 'RADIUS') {
186
+ if (d?.delivery_type === 'RADIUS') {
187
187
  sum += (d.delivery_fee || 0) * (d.delivery_radius || 1);
188
188
  }
189
189
  else {
package/lib/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * as Calcs from './Calcs';
2
2
  export * as Setters from './setters';
3
3
  export * as Types from './types';
4
+ export * from './types';
@@ -1,4 +1,5 @@
1
1
  export * as Calcs from './Calcs';
2
2
  export * as Setters from './setters';
3
3
  export * as Types from './types';
4
+ export * from './types';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lazywait-calcs",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "description": "An npm package for all calculations needed in LazyWait projects.",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "repository": "https://github.com/CloudAppsLLC/Calcs.git",