@k03mad/ip2geo 10.1.0 → 10.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.
@@ -221,6 +221,7 @@ export const pruneCache = async (cacheDir, cacheFileSeparator, cacheFileNewline)
221
221
  const uniqSorted = [...new Set(dataArrRemoveEmpty)]
222
222
  .sort((a, b) => cacheLineToNum(a) - cacheLineToNum(b));
223
223
 
224
+ getArrayDups(dataArrRemoveEmpty).forEach(dup => duplicates.add(dup));
224
225
  const dupsIp = getArrayDups(uniqSorted.map(elem => elem.split(cacheFileSeparator)[0]));
225
226
 
226
227
  const removeDiffs = uniqSorted.filter(elem => {
@@ -240,9 +241,6 @@ export const pruneCache = async (cacheDir, cacheFileSeparator, cacheFileNewline)
240
241
  } else {
241
242
  await fs.rm(fullFilePath);
242
243
  }
243
-
244
- const dups = getArrayDups(dataArrRemoveEmpty);
245
- dups.forEach(dup => duplicates.add(dup));
246
244
  }));
247
245
 
248
246
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/ip2geo",
3
- "version": "10.1.0",
3
+ "version": "10.1.1",
4
4
  "description": "GeoIP library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"