b2m-utils 0.0.146 → 0.0.148

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/build/index.js CHANGED
@@ -2,7 +2,76 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var convertNumberToCurrency = function (value, locale) {
5
+ /******************************************************************************
6
+ Copyright (c) Microsoft Corporation.
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any
9
+ purpose with or without fee is hereby granted.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ ***************************************************************************** */
19
+
20
+ var __assign = function() {
21
+ __assign = Object.assign || function __assign(t) {
22
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
23
+ s = arguments[i];
24
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
25
+ }
26
+ return t;
27
+ };
28
+ return __assign.apply(this, arguments);
29
+ };
30
+
31
+ function __awaiter(thisArg, _arguments, P, generator) {
32
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
33
+ return new (P || (P = Promise))(function (resolve, reject) {
34
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
35
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
36
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
37
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
38
+ });
39
+ }
40
+
41
+ function __generator(thisArg, body) {
42
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
+ function verb(n) { return function (v) { return step([n, v]); }; }
45
+ function step(op) {
46
+ if (f) throw new TypeError("Generator is already executing.");
47
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
48
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
+ if (y = 0, t) op = [op[0] & 2, t.value];
50
+ switch (op[0]) {
51
+ case 0: case 1: t = op; break;
52
+ case 4: _.label++; return { value: op[1], done: false };
53
+ case 5: _.label++; y = op[1]; op = [0]; continue;
54
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
+ default:
56
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
+ if (t[2]) _.ops.pop();
61
+ _.trys.pop(); continue;
62
+ }
63
+ op = body.call(thisArg, _);
64
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
+ }
67
+ }
68
+
69
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
70
+ var e = new Error(message);
71
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
72
+ };
73
+
74
+ var convertNumberToCurrency = function (value, locale, options) {
6
75
  if (locale === void 0) { locale = 'en-US'; }
7
76
  var configObject = {
8
77
  locale: 'en-US',
@@ -14,10 +83,7 @@ var convertNumberToCurrency = function (value, locale) {
14
83
  configObject.currency = 'BRL';
15
84
  break;
16
85
  }
17
- return (+value).toLocaleString(configObject.locale, {
18
- style: 'currency',
19
- currency: configObject.currency,
20
- });
86
+ return (+value).toLocaleString(configObject.locale, __assign({ style: 'currency', currency: configObject.currency }, options));
21
87
  };
22
88
 
23
89
  var getNormalizedCityName = function (name) {
@@ -6413,64 +6479,6 @@ var getFormattedFreightPlaceName = function (freightPlace, modalId, complete, sq
6413
6479
  }
6414
6480
  };
6415
6481
 
6416
- /******************************************************************************
6417
- Copyright (c) Microsoft Corporation.
6418
-
6419
- Permission to use, copy, modify, and/or distribute this software for any
6420
- purpose with or without fee is hereby granted.
6421
-
6422
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
6423
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6424
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
6425
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6426
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6427
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6428
- PERFORMANCE OF THIS SOFTWARE.
6429
- ***************************************************************************** */
6430
-
6431
- function __awaiter(thisArg, _arguments, P, generator) {
6432
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6433
- return new (P || (P = Promise))(function (resolve, reject) {
6434
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6435
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6436
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6437
- step((generator = generator.apply(thisArg, _arguments || [])).next());
6438
- });
6439
- }
6440
-
6441
- function __generator(thisArg, body) {
6442
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6443
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6444
- function verb(n) { return function (v) { return step([n, v]); }; }
6445
- function step(op) {
6446
- if (f) throw new TypeError("Generator is already executing.");
6447
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
6448
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
6449
- if (y = 0, t) op = [op[0] & 2, t.value];
6450
- switch (op[0]) {
6451
- case 0: case 1: t = op; break;
6452
- case 4: _.label++; return { value: op[1], done: false };
6453
- case 5: _.label++; y = op[1]; op = [0]; continue;
6454
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
6455
- default:
6456
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6457
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6458
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6459
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6460
- if (t[2]) _.ops.pop();
6461
- _.trys.pop(); continue;
6462
- }
6463
- op = body.call(thisArg, _);
6464
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6465
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6466
- }
6467
- }
6468
-
6469
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
6470
- var e = new Error(message);
6471
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
6472
- };
6473
-
6474
6482
  var setFormattedDatesInObjects = function (objectFormat) { return __awaiter(void 0, void 0, void 0, function () {
6475
6483
  var _a, _b, _c, _i, key, formattedDate, _d, _e, _f, _g;
6476
6484
  return __generator(this, function (_h) {
package/build/index.js.gz CHANGED
Binary file