@metascraper/helpers
Advanced tools
Comparing version
@@ -6,2 +6,13 @@ # Change Log | ||
## [5.8.12](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-helpers/compare/v5.8.11...v5.8.12) (2019-12-17) | ||
### Bug Fixes | ||
* parse years ([c65f73e](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-helpers/commit/c65f73ed4c3446ec9f72dd2d8a7b7e97d815fabd)) | ||
## [5.8.10](https://github.com/microlinkhq/metascraper/tree/master/packages/metascraper-helpers/compare/v5.8.9...v5.8.10) (2019-12-13) | ||
@@ -8,0 +19,0 @@ |
@@ -20,2 +20,3 @@ 'use strict' | ||
toLower, | ||
toString, | ||
trim | ||
@@ -201,2 +202,6 @@ } = require('lodash') | ||
if (/^\d{4}$/.test(value)) { | ||
return new Date(toString(value)).toISOString() | ||
} | ||
const parsed = chrono.parseDate(value) | ||
@@ -203,0 +208,0 @@ if (isDate(parsed)) return parsed.toISOString() |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-helpers", | ||
"version": "5.8.10", | ||
"version": "5.8.12", | ||
"main": "index.js", | ||
@@ -63,3 +63,3 @@ "repository": { | ||
}, | ||
"gitHead": "a843ed2e09d8c6b4d6c7bd190506c443c558b822" | ||
"gitHead": "61cd5d385e9981c1b988c8fca87408863c93b14b" | ||
} |
22126
1.92%272
1.49%