unprint 0.18.8 → 0.18.9

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 +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.18.8",
3
+ "version": "0.18.9",
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
@@ -783,11 +783,11 @@ function extractDateAgo(dateString, customOptions) {
783
783
  }
784
784
 
785
785
  const options = {
786
- match: /(\d+)\s*(\w+)/,
786
+ match: /(\d+)\s*(\w+)/i,
787
787
  ...customOptions,
788
788
  };
789
789
 
790
- const timeMatch = dateString.match(options.match);
790
+ const timeMatch = dateString.toLowerCase().match(options.match);
791
791
 
792
792
  if (timeMatch) {
793
793
  const [n, period] = timeMatch.slice(1);