unprint 0.9.5 → 0.9.6

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.9.5",
3
+ "version": "0.9.6",
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
@@ -193,11 +193,11 @@ const defaultNumberRegexp = /\d+(\.\d+)?/;
193
193
 
194
194
  function matchNumberString(numberString, options) {
195
195
  if (numberString && options.match) {
196
- return Number(numberString.match(options.match)?.[options.matchIndex]);
196
+ return Number(numberString.match(options.match)?.[options.matchIndex]) || null;
197
197
  }
198
198
 
199
199
  if (numberString) {
200
- return Number(numberString);
200
+ return Number(numberString) || null;
201
201
  }
202
202
 
203
203
  return null;