@fileverse-dev/formulajs 4.4.12-mod-7 → 4.4.12-mod-8

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/index.cjs CHANGED
@@ -18668,6 +18668,14 @@ async function DUNESIM() {
18668
18668
  minute: "2-digit"
18669
18669
  }).format(new Date(item.first_acquired));
18670
18670
  }
18671
+ if(item.historical_prices){
18672
+ const prices = item.historical_prices;
18673
+ prices.forEach((priceData) => {
18674
+ const key = "price_" + priceData.offset_hours +"h";
18675
+ const price = priceData.price_usd;
18676
+ item[key] = price;
18677
+ });
18678
+ }
18671
18679
  return flattenObject(item)
18672
18680
  });
18673
18681
  return result
@@ -18683,7 +18691,7 @@ async function DUNESIM() {
18683
18691
  // console.log('Activity result:', res1, res1.length);
18684
18692
 
18685
18693
  // Example: price (token-info)
18686
- // const res2 = await DUNESIM('price', 'base', '1,6,24', "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", 5);
18694
+ // const res2 = await DUNESIM('price', 'eth', '1,6,24', "", 5);
18687
18695
  // console.log('Price result:', res2);
18688
18696
 
18689
18697
  // // Example: token holders
package/lib/esm/index.mjs CHANGED
@@ -18666,6 +18666,14 @@ async function DUNESIM() {
18666
18666
  minute: "2-digit"
18667
18667
  }).format(new Date(item.first_acquired));
18668
18668
  }
18669
+ if(item.historical_prices){
18670
+ const prices = item.historical_prices;
18671
+ prices.forEach((priceData) => {
18672
+ const key = "price_" + priceData.offset_hours +"h";
18673
+ const price = priceData.price_usd;
18674
+ item[key] = price;
18675
+ });
18676
+ }
18669
18677
  return flattenObject(item)
18670
18678
  });
18671
18679
  return result
@@ -18681,7 +18689,7 @@ async function DUNESIM() {
18681
18689
  // console.log('Activity result:', res1, res1.length);
18682
18690
 
18683
18691
  // Example: price (token-info)
18684
- // const res2 = await DUNESIM('price', 'base', '1,6,24', "0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", 5);
18692
+ // const res2 = await DUNESIM('price', 'eth', '1,6,24', "", 5);
18685
18693
  // console.log('Price result:', res2);
18686
18694
 
18687
18695
  // // Example: token holders
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.12-mod-7",
3
+ "version": "4.4.12-mod-8",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {