@bluelilo/search-utils
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -49,3 +49,9 @@ "use strict"; | ||
if ((0, _moment.default)(departureDate).diff((0, _moment.default)(), 'seconds') <= 0) { | ||
const momentDepartureDate = (0, _moment.default)(departureDate); | ||
if (!momentDepartureDate.isValid()) { | ||
throw new ValidationError('departure date is invalid'); | ||
} | ||
if (momentDepartureDate.diff((0, _moment.default)(), 'seconds') <= 0) { | ||
throw new ValidationError('departure date must be in the future'); | ||
@@ -52,0 +58,0 @@ } |
{ | ||
"name": "@bluelilo/search-utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -8,6 +8,6 @@ "scripts": { | ||
"prettier": "prettier --check 'src/**/*.js'", | ||
"build": "rm -rf lib && babel src --out-dir lib", | ||
"build": "rm -rf lib && babel src --out-dir lib --ignore '**/*.spec.js'", | ||
"release": "release-it", | ||
"prepublish": "npm run lint && npm run prettier && npm run build", | ||
"test": "jest --coverage" | ||
"test": "jest --coverage src" | ||
}, | ||
@@ -14,0 +14,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8312
7
232