@fileverse-dev/formulajs 4.4.43 → 4.4.44

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.
@@ -1,4 +1,4 @@
1
- /* @fileverse-dev/formulajs v4.4.43 */
1
+ /* @fileverse-dev/formulajs v4.4.44 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -16489,7 +16489,7 @@ function _typeof(o) {
16489
16489
  }
16490
16490
  function _AAVE() {
16491
16491
  _AAVE = _asyncToGenerator(_regenerator().m(function _callee42() {
16492
- var _argsToArray3, _argsToArray4, graphType, category, param1, param2, columnName, baseUrl, url, res, _json, filterColumnName, _data5, _args43 = arguments, _t1;
16492
+ var _argsToArray3, _argsToArray4, graphType, category, param1, param2, columnName, baseUrl, url, res, _json, filterColumnName, _args43 = arguments, _t1;
16493
16493
  return _regenerator().w(function(_context43) {
16494
16494
  while (1) switch (_context43.p = _context43.n) {
16495
16495
  case 0:
@@ -16534,31 +16534,24 @@ function _typeof(o) {
16534
16534
  var flat = {};
16535
16535
  Object.entries(item).forEach(function(_ref29) {
16536
16536
  var _ref30 = _slicedToArray(_ref29, 2), k = _ref30[0], v = _ref30[1];
16537
- if (columnName && filterColumnName.includes(k) && (v === null || _typeof(v) !== "object")) flat[k] = v;
16537
+ if (columnName) {
16538
+ if (filterColumnName.includes(k) && (v === null || _typeof(v) !== "object")) flat[k] = v;
16539
+ } else {
16540
+ if (v === null || _typeof(v) !== "object") flat[k] = v;
16541
+ }
16538
16542
  });
16539
16543
  return flat;
16540
16544
  }));
16541
16545
 
16542
16546
  case 4:
16543
- if (!(columnName && _typeof(_json) === "object")) {
16544
- _context43.n = 5;
16545
- break;
16546
- }
16547
- _data5 = {};
16548
- filterColumnName.forEach(function(k) {
16549
- _data5[k] = _json[k];
16550
- });
16551
- return _context43.a(2, _data5);
16552
-
16553
- case 5:
16554
16547
  return _context43.a(2, _json);
16555
16548
 
16556
- case 6:
16557
- _context43.p = 6;
16549
+ case 5:
16550
+ _context43.p = 5;
16558
16551
  _t1 = _context43.v;
16559
16552
  return _context43.a(2, errorMessageHandler(_t1, "AAVE"));
16560
16553
  }
16561
- }, _callee42, null, [ [ 0, 6 ] ]);
16554
+ }, _callee42, null, [ [ 0, 5 ] ]);
16562
16555
  }));
16563
16556
  return _AAVE.apply(this, arguments);
16564
16557
  }
@@ -17562,7 +17555,7 @@ function _typeof(o) {
17562
17555
  }
17563
17556
  function _COINGECKO() {
17564
17557
  _COINGECKO = _asyncToGenerator(_regenerator().m(function _callee49() {
17565
- var _category$toLowerCase, _argsToArray1, _argsToArray10, category, param1, param2, columnName, apiKey, headers, url, vs, map, _category, trend, _category2, _trend, _getUrlAndHeaders5, finalUrl, HEADERS, res, _json3, _json3$status, msg, out, _i34, _Object$entries, _Object$entries$_i, token, prices, _i35, _Object$entries2, _Object$entries2$_i, cur, val, _data6, _args53 = arguments, _t17, _t18;
17558
+ var _category$toLowerCase, _argsToArray1, _argsToArray10, category, param1, param2, columnName, apiKey, headers, url, vs, map, _category, trend, _category2, _trend, _getUrlAndHeaders5, finalUrl, HEADERS, res, _json3, _json3$status, msg, out, _i34, _Object$entries, _Object$entries$_i, token, prices, _i35, _Object$entries2, _Object$entries2$_i, cur, val, _data5, _args53 = arguments, _t17, _t18;
17566
17559
  return _regenerator().w(function(_context53) {
17567
17560
  while (1) switch (_context53.p = _context53.n) {
17568
17561
  case 0:
@@ -17668,8 +17661,8 @@ function _typeof(o) {
17668
17661
  return _context53.a(2, [ out ]);
17669
17662
 
17670
17663
  case 10:
17671
- _data6 = Array.isArray(_json3) ? _json3 : [ _json3 ];
17672
- return _context53.a(2, _data6.map(function(item) {
17664
+ _data5 = Array.isArray(_json3) ? _json3 : [ _json3 ];
17665
+ return _context53.a(2, _data5.map(function(item) {
17673
17666
  var flat = {};
17674
17667
  for (var _i36 = 0, _Object$entries3 = Object.entries(item); _i36 < _Object$entries3.length; _i36++) {
17675
17668
  var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i36], 2), key = _Object$entries3$_i[0], _value22 = _Object$entries3$_i[1];
@@ -17774,7 +17767,7 @@ function _typeof(o) {
17774
17767
  return s.trim();
17775
17768
  });
17776
17769
  return _context54.a(2, (Array.isArray(_json4) ? _json4 : [ _json4 ]).map(function(item) {
17777
- if (!filterColumnName) return item;
17770
+ if (!columnName) return item;
17778
17771
  var out = {};
17779
17772
  for (var _i37 = 0, _Object$entries4 = Object.entries(item); _i37 < _Object$entries4.length; _i37++) {
17780
17773
  var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i37], 2), k = _Object$entries4$_i[0], v = _Object$entries4$_i[1];
@@ -17905,7 +17898,7 @@ function _typeof(o) {
17905
17898
  }
17906
17899
  function _FARCASTER() {
17907
17900
  _FARCASTER = _asyncToGenerator(_regenerator().m(function _callee52() {
17908
- var _argsToArray15, _argsToArray16, contentType, identifier, _argsToArray16$, start, _argsToArray16$2, end, apiKey, url, typeMap, _getUrlAndHeaders6, finalUrl, HEADERS, response, _yield$response$json, _data7, _args56 = arguments, _t22;
17901
+ var _argsToArray15, _argsToArray16, contentType, identifier, _argsToArray16$, start, _argsToArray16$2, end, apiKey, url, typeMap, _getUrlAndHeaders6, finalUrl, HEADERS, response, _yield$response$json, _data6, _args56 = arguments, _t22;
17909
17902
  return _regenerator().w(function(_context56) {
17910
17903
  while (1) switch (_context56.p = _context56.n) {
17911
17904
  case 0:
@@ -17960,15 +17953,15 @@ function _typeof(o) {
17960
17953
 
17961
17954
  case 3:
17962
17955
  _yield$response$json = _context56.v;
17963
- _data7 = _yield$response$json.data;
17964
- if (Array.isArray(_data7)) {
17956
+ _data6 = _yield$response$json.data;
17957
+ if (Array.isArray(_data6)) {
17965
17958
  _context56.n = 4;
17966
17959
  break;
17967
17960
  }
17968
17961
  return _context56.a(2, []);
17969
17962
 
17970
17963
  case 4:
17971
- return _context56.a(2, _data7.map(function(item) {
17964
+ return _context56.a(2, _data6.map(function(item) {
17972
17965
  var flat = {};
17973
17966
  for (var _i38 = 0, _Object$entries5 = Object.entries(item); _i38 < _Object$entries5.length; _i38++) {
17974
17967
  var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i38], 2), k = _Object$entries5$_i[0], v = _Object$entries5$_i[1];
@@ -18024,7 +18017,7 @@ function _typeof(o) {
18024
18017
  }
18025
18018
  function _FIREFLY() {
18026
18019
  _FIREFLY = _asyncToGenerator(_regenerator().m(function _callee53() {
18027
- var _argsToArray17, _argsToArray18, platform, contentType, identifier, _argsToArray18$, start, _argsToArray18$2, end, apiKey, url, _getUrlAndHeaders7, finalUrl, HEADERS, response, _yield$response$json2, _data8, _args57 = arguments, _t23;
18020
+ var _argsToArray17, _argsToArray18, platform, contentType, identifier, _argsToArray18$, start, _argsToArray18$2, end, apiKey, url, _getUrlAndHeaders7, finalUrl, HEADERS, response, _yield$response$json2, _data7, _args57 = arguments, _t23;
18028
18021
  return _regenerator().w(function(_context57) {
18029
18022
  while (1) switch (_context57.p = _context57.n) {
18030
18023
  case 0:
@@ -18075,15 +18068,15 @@ function _typeof(o) {
18075
18068
 
18076
18069
  case 3:
18077
18070
  _yield$response$json2 = _context57.v;
18078
- _data8 = _yield$response$json2.data;
18079
- if (Array.isArray(_data8)) {
18071
+ _data7 = _yield$response$json2.data;
18072
+ if (Array.isArray(_data7)) {
18080
18073
  _context57.n = 4;
18081
18074
  break;
18082
18075
  }
18083
18076
  return _context57.a(2, []);
18084
18077
 
18085
18078
  case 4:
18086
- return _context57.a(2, _data8.map(function(item) {
18079
+ return _context57.a(2, _data7.map(function(item) {
18087
18080
  var flat = {};
18088
18081
  for (var _i39 = 0, _Object$entries6 = Object.entries(item); _i39 < _Object$entries6.length; _i39++) {
18089
18082
  var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i39], 2), key = _Object$entries6$_i[0], _value23 = _Object$entries6$_i[1];
@@ -18166,7 +18159,7 @@ function _typeof(o) {
18166
18159
  }
18167
18160
  function _LENS() {
18168
18161
  _LENS = _asyncToGenerator(_regenerator().m(function _callee55() {
18169
- var _argsToArray21, _argsToArray22, contentType, identifier, _argsToArray22$, start, _argsToArray22$2, end, apiKey, url, typeMap, _getUrlAndHeaders8, finalUrl, HEADERS, response, _yield$response$json3, _data9, _args59 = arguments, _t25;
18162
+ var _argsToArray21, _argsToArray22, contentType, identifier, _argsToArray22$, start, _argsToArray22$2, end, apiKey, url, typeMap, _getUrlAndHeaders8, finalUrl, HEADERS, response, _yield$response$json3, _data8, _args59 = arguments, _t25;
18170
18163
  return _regenerator().w(function(_context59) {
18171
18164
  while (1) switch (_context59.p = _context59.n) {
18172
18165
  case 0:
@@ -18220,15 +18213,15 @@ function _typeof(o) {
18220
18213
 
18221
18214
  case 3:
18222
18215
  _yield$response$json3 = _context59.v;
18223
- _data9 = _yield$response$json3.data;
18224
- if (Array.isArray(_data9)) {
18216
+ _data8 = _yield$response$json3.data;
18217
+ if (Array.isArray(_data8)) {
18225
18218
  _context59.n = 4;
18226
18219
  break;
18227
18220
  }
18228
18221
  return _context59.a(2, []);
18229
18222
 
18230
18223
  case 4:
18231
- return _context59.a(2, _data9.map(function(item) {
18224
+ return _context59.a(2, _data8.map(function(item) {
18232
18225
  var flat = {};
18233
18226
  for (var _i40 = 0, _Object$entries7 = Object.entries(item); _i40 < _Object$entries7.length; _i40++) {
18234
18227
  var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i40], 2), key = _Object$entries7$_i[0], _value24 = _Object$entries7$_i[1];
@@ -18492,7 +18485,7 @@ function _typeof(o) {
18492
18485
  }
18493
18486
  function _UNISWAP() {
18494
18487
  _UNISWAP = _asyncToGenerator(_regenerator().m(function _callee58() {
18495
- var _argsToArray27, _argsToArray28, graphType, category, param1, param2, columnName, baseUrl, url, res, _json7, filterColumnName, _data0, _args62 = arguments, _t28;
18488
+ var _argsToArray27, _argsToArray28, graphType, category, param1, param2, columnName, baseUrl, url, res, _json7, filterColumnName, _data9, _args62 = arguments, _t28;
18496
18489
  return _regenerator().w(function(_context62) {
18497
18490
  while (1) switch (_context62.p = _context62.n) {
18498
18491
  case 0:
@@ -18534,6 +18527,7 @@ function _typeof(o) {
18534
18527
  break;
18535
18528
  }
18536
18529
  return _context62.a(2, _json7.map(function(item) {
18530
+ if (!columnName) return item;
18537
18531
  var flat = {};
18538
18532
  Object.entries(item).forEach(function(_ref34) {
18539
18533
  var _ref35 = _slicedToArray(_ref34, 2), k = _ref35[0], v = _ref35[1];
@@ -18547,11 +18541,11 @@ function _typeof(o) {
18547
18541
  _context62.n = 5;
18548
18542
  break;
18549
18543
  }
18550
- _data0 = {};
18544
+ _data9 = {};
18551
18545
  filterColumnName.forEach(function(k) {
18552
- _data0[k] = _json7[k];
18546
+ _data9[k] = _json7[k];
18553
18547
  });
18554
- return _context62.a(2, _data0);
18548
+ return _context62.a(2, _data9);
18555
18549
 
18556
18550
  case 5:
18557
18551
  return _context62.a(2, _json7);
@@ -18602,7 +18596,7 @@ function _typeof(o) {
18602
18596
  }
18603
18597
  function _TALLY() {
18604
18598
  _TALLY = _asyncToGenerator(_regenerator().m(function _callee60() {
18605
- var _argsToArray29, _argsToArray30, query, slug, baseUrl, url, res, _data1, _args64 = arguments, _t30;
18599
+ var _argsToArray29, _argsToArray30, query, slug, baseUrl, url, res, _data0, _args64 = arguments, _t30;
18606
18600
  return _regenerator().w(function(_context64) {
18607
18601
  while (1) switch (_context64.p = _context64.n) {
18608
18602
  case 0:
@@ -18631,8 +18625,8 @@ function _typeof(o) {
18631
18625
  return res.json();
18632
18626
 
18633
18627
  case 3:
18634
- _data1 = _context64.v;
18635
- return _context64.a(2, _data1);
18628
+ _data0 = _context64.v;
18629
+ return _context64.a(2, _data0);
18636
18630
 
18637
18631
  case 4:
18638
18632
  _context64.p = 4;
@@ -18777,7 +18771,7 @@ function _typeof(o) {
18777
18771
  }
18778
18772
  function _DUNE() {
18779
18773
  _DUNE = _asyncToGenerator(_regenerator().m(function _callee62() {
18780
- var _ref40, _json8$activity, _ref41, _json8$holders, _ref42, _json8$tokens, _argsToArray31, _argsToArray32, type, input1, input2, input3, input4, route, buildQuery, address, qs, chain, _qs, tokenAddress, _qs2, _chain, apiKey, url, _getUrlAndHeaders1, finalUrl, HEADERS, res, _data10, _json8, _data11, result, _final, globalDecimals, _iterator57, _step57, _loop5, _args67 = arguments, _t33, _t34;
18774
+ var _ref40, _json8$activity, _ref41, _json8$holders, _ref42, _json8$tokens, _argsToArray31, _argsToArray32, type, input1, input2, input3, input4, route, buildQuery, address, qs, chain, _qs, tokenAddress, _qs2, _chain, apiKey, url, _getUrlAndHeaders1, finalUrl, HEADERS, res, _data1, _json8, _data10, result, _final, globalDecimals, _iterator57, _step57, _loop5, _args67 = arguments, _t33, _t34;
18781
18775
  return _regenerator().w(function(_context67) {
18782
18776
  while (1) switch (_context67.p = _context67.n) {
18783
18777
  case 0:
@@ -18856,8 +18850,8 @@ function _typeof(o) {
18856
18850
  return res.json();
18857
18851
 
18858
18852
  case 4:
18859
- _data10 = _context67.v;
18860
- throw new ValidationError(_data10.message);
18853
+ _data1 = _context67.v;
18854
+ throw new ValidationError(_data1.message);
18861
18855
 
18862
18856
  case 5:
18863
18857
  throw new NetworkError(SERVICES_API_KEY.DuneSim, res.status);
@@ -18868,8 +18862,8 @@ function _typeof(o) {
18868
18862
 
18869
18863
  case 7:
18870
18864
  _json8 = _context67.v;
18871
- _data11 = type === "activity" ? (_ref40 = (_json8$activity = _json8 === null || _json8 === void 0 ? void 0 : _json8.activity) !== null && _json8$activity !== void 0 ? _json8$activity : _json8) !== null && _ref40 !== void 0 ? _ref40 : [] : type === "token-holders" ? (_ref41 = (_json8$holders = _json8 === null || _json8 === void 0 ? void 0 : _json8.holders) !== null && _json8$holders !== void 0 ? _json8$holders : _json8) !== null && _ref41 !== void 0 ? _ref41 : [] : type === "price" ? (_ref42 = (_json8$tokens = _json8 === null || _json8 === void 0 ? void 0 : _json8.tokens) !== null && _json8$tokens !== void 0 ? _json8$tokens : _json8) !== null && _ref42 !== void 0 ? _ref42 : [] : _json8 !== null && _json8 !== void 0 ? _json8 : [];
18872
- result = Array.isArray(_data11) ? _data11 : [ _data11 ];
18865
+ _data10 = type === "activity" ? (_ref40 = (_json8$activity = _json8 === null || _json8 === void 0 ? void 0 : _json8.activity) !== null && _json8$activity !== void 0 ? _json8$activity : _json8) !== null && _ref40 !== void 0 ? _ref40 : [] : type === "token-holders" ? (_ref41 = (_json8$holders = _json8 === null || _json8 === void 0 ? void 0 : _json8.holders) !== null && _json8$holders !== void 0 ? _json8$holders : _json8) !== null && _ref41 !== void 0 ? _ref41 : [] : type === "price" ? (_ref42 = (_json8$tokens = _json8 === null || _json8 === void 0 ? void 0 : _json8.tokens) !== null && _json8$tokens !== void 0 ? _json8$tokens : _json8) !== null && _ref42 !== void 0 ? _ref42 : [] : _json8 !== null && _json8 !== void 0 ? _json8 : [];
18866
+ result = Array.isArray(_data10) ? _data10 : [ _data10 ];
18873
18867
  _final = [];
18874
18868
  _iterator57 = _createForOfIteratorHelper(result);
18875
18869
  _context67.p = 8;
@@ -19049,7 +19043,7 @@ function _typeof(o) {
19049
19043
  }
19050
19044
  function _PRICE() {
19051
19045
  _PRICE = _asyncToGenerator(_regenerator().m(function _callee63() {
19052
- var _input, _input2, _input3, _argsToArray33, _argsToArray34, input1, input2, input3, baseUrl, url, returnSingleValue, tokenAddress, coin, res, errorData, _data12, _args68 = arguments, _t35;
19046
+ var _input, _input2, _input3, _argsToArray33, _argsToArray34, input1, input2, input3, baseUrl, url, returnSingleValue, tokenAddress, coin, res, errorData, _data11, _args68 = arguments, _t35;
19053
19047
  return _regenerator().w(function(_context68) {
19054
19048
  while (1) switch (_context68.p = _context68.n) {
19055
19049
  case 0:
@@ -19110,15 +19104,15 @@ function _typeof(o) {
19110
19104
  return res.json();
19111
19105
 
19112
19106
  case 5:
19113
- _data12 = _context68.v;
19107
+ _data11 = _context68.v;
19114
19108
  if (!returnSingleValue) {
19115
19109
  _context68.n = 6;
19116
19110
  break;
19117
19111
  }
19118
- return _context68.a(2, _data12[0].price);
19112
+ return _context68.a(2, _data11[0].price);
19119
19113
 
19120
19114
  case 6:
19121
- return _context68.a(2, _data12);
19115
+ return _context68.a(2, _data11);
19122
19116
 
19123
19117
  case 7:
19124
19118
  _context68.p = 7;
@@ -29186,7 +29180,7 @@ function _typeof(o) {
29186
29180
  }
29187
29181
  function _CIRCLES() {
29188
29182
  _CIRCLES = _asyncToGenerator(_regenerator().m(function _callee68() {
29189
- var _argsToArray39, _argsToArray40, functionName, address, entries, columnName, resolved, dataClient, limit, runOnePage, dataTrust, filterColumnName, _data13, _filterColumnName, res, balance, _args73 = arguments, _t39, _t40;
29183
+ var _argsToArray39, _argsToArray40, functionName, address, entries, columnName, resolved, dataClient, limit, runOnePage, dataTrust, filterColumnName, _data12, _filterColumnName, res, balance, _args73 = arguments, _t39, _t40;
29190
29184
  return _regenerator().w(function(_context73) {
29191
29185
  while (1) switch (_context73.p = _context73.n) {
29192
29186
  case 0:
@@ -29271,7 +29265,7 @@ function _typeof(o) {
29271
29265
  return runOnePage(dataClient.getTransactionHistory(resolved, limit));
29272
29266
 
29273
29267
  case 6:
29274
- _data13 = _context73.v;
29268
+ _data12 = _context73.v;
29275
29269
  if (!columnName) {
29276
29270
  _context73.n = 7;
29277
29271
  break;
@@ -29279,7 +29273,7 @@ function _typeof(o) {
29279
29273
  _filterColumnName = columnName.split(",").map(function(s) {
29280
29274
  return s.trim();
29281
29275
  });
29282
- return _context73.a(2, _data13.map(function(obj) {
29276
+ return _context73.a(2, _data12.map(function(obj) {
29283
29277
  return Object.fromEntries(_filterColumnName.filter(function(key) {
29284
29278
  return key in obj;
29285
29279
  }).map(function(key) {
@@ -29288,7 +29282,7 @@ function _typeof(o) {
29288
29282
  }));
29289
29283
 
29290
29284
  case 7:
29291
- return _context73.a(2, _data13);
29285
+ return _context73.a(2, _data12);
29292
29286
 
29293
29287
  case 8:
29294
29288
  _context73.n = 9;