unprint 0.10.8 → 0.10.10

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 +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
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
@@ -553,7 +553,7 @@ function extractDate(dateString, format, customOptions) {
553
553
  }
554
554
 
555
555
  const options = {
556
- match: /((\d{1,4}[/-]\d{1,2}[/-]\d{1,4})|(\w+\s+\d{1,2},?\s+\d{4}))(\s+\d{1,2}:\d{2}(:\d{2})?)?/g, // matches any of 01-01-1970, 1970-01-01 and January 1, 1970 with optional 00:00[:00] time
556
+ match: /((\d{1,4}[/-]\d{1,2}[/-]\d{1,4})|(\w+\s+\d{1,2},?\s+\d{4}))((T|\s+)\d{1,2}:\d{2}(:\d{2})?)?/g, // matches any of 01-01-1970, 1970-01-01 and January 1, 1970 with optional 00:00[:00] time
557
557
  matchIndex: 0,
558
558
  timezone: 'UTC',
559
559
  ...customOptions,
@@ -869,6 +869,10 @@ module.exports = {
869
869
  extractDuration,
870
870
  extractTimestamp,
871
871
  formatDate,
872
+ dateConstants: {
873
+ ISO_8601: moment.ISO_8601,
874
+ ...moment.HTML5_FMT,
875
+ },
872
876
  prefixUrl,
873
877
  options: configure,
874
878
  query: initQueryFns(queryFns),