@factorypure/client-helpers 1.1.23 → 1.1.24

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@ import { startOfDay, subDays } from 'date-fns';
3
3
  import { Index } from 'flexsearch';
4
4
  import EnglishPreset from 'flexsearch/lang/en';
5
5
  import { z } from 'zod';
6
+ // npm install /Users/kokkoalex/Documents/GitHub/npm-packages/client-helpers
6
7
  /**
7
8
  * @packageDocumentation
8
9
  * @module @factorypure/client-helpers
@@ -1582,8 +1583,8 @@ export const filterScrapeResultsV2 = ({ scrapeResults, variant, variantScrapeOpt
1582
1583
  function handleDuplicatesV2(results) {
1583
1584
  const filteredUniqueResultsMap = {};
1584
1585
  results.forEach((item) => {
1585
- // TODO ALEX this should probably compare on listing_hash
1586
- const key = `${item.source}-${item.title}-${item.extracted_total ?? item.extracted_price}`;
1586
+ // @ts-ignore
1587
+ const key = item.listing_hash;
1587
1588
  if (!filteredUniqueResultsMap[key]) {
1588
1589
  filteredUniqueResultsMap[key] = item;
1589
1590
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorypure/client-helpers",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",