unprint 0.18.26 → 0.18.27

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/package.json +1 -1
  2. package/src/app.js +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.18.26",
3
+ "version": "0.18.27",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {},
package/src/app.js CHANGED
@@ -530,6 +530,10 @@ function extractSourceSet(sourceSet, customOptions) {
530
530
  return -1;
531
531
  }
532
532
 
533
+ if (sourceA.density && sourceB.density && sourceA.density > sourceB.density) {
534
+ return -1;
535
+ }
536
+
533
537
  if (sourceA.width && sourceB.width && sourceA.width < sourceB.width) {
534
538
  return 1;
535
539
  }
@@ -538,6 +542,10 @@ function extractSourceSet(sourceSet, customOptions) {
538
542
  return 1;
539
543
  }
540
544
 
545
+ if (sourceA.density && sourceB.density && sourceA.density < sourceB.density) {
546
+ return 1;
547
+ }
548
+
541
549
  return 0;
542
550
  });
543
551