unprint 0.11.6 → 0.11.7
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.
- package/package.json +1 -1
- package/src/app.js +4 -3
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -200,7 +200,7 @@ function queryDatasets(context, selector, dataAttribute, customOptions) {
|
|
|
200
200
|
|
|
201
201
|
const defaultNumberRegexp = /\d+([.,]\d+)?/;
|
|
202
202
|
|
|
203
|
-
function
|
|
203
|
+
function extractNumber(rawNumberString, options) {
|
|
204
204
|
if (!rawNumberString) {
|
|
205
205
|
return null;
|
|
206
206
|
}
|
|
@@ -230,7 +230,7 @@ function queryNumber(context, selector, customOptions) {
|
|
|
230
230
|
...customOptions,
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
-
return
|
|
233
|
+
return extractNumber(numberString, options);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
function queryNumbers(context, selector, customOptions) {
|
|
@@ -248,7 +248,7 @@ function queryNumbers(context, selector, customOptions) {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
return numberStrings
|
|
251
|
-
.map((numberString) =>
|
|
251
|
+
.map((numberString) => extractNumber(numberString, options))
|
|
252
252
|
.filter(Boolean);
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -928,6 +928,7 @@ module.exports = {
|
|
|
928
928
|
initAll,
|
|
929
929
|
extractDate,
|
|
930
930
|
extractDuration,
|
|
931
|
+
extractNumber,
|
|
931
932
|
extractTimestamp,
|
|
932
933
|
formatDate,
|
|
933
934
|
dateConstants: {
|