cron-parser
Advanced tools
Comparing version 3.5.0 to 4.0.0
@@ -5,3 +5,3 @@ { | ||
"description": "Node.js library for parsing crontab instructions", | ||
"version": "2.13.0", | ||
"version": "4.0.0", | ||
"keywords": ["cron", "crontab", "parser"], | ||
@@ -8,0 +8,0 @@ "dependencies": {}, |
@@ -6,5 +6,2 @@ 'use strict'; | ||
// Get Number.isNaN or the polyfill | ||
var safeIsNaN = require('is-nan'); | ||
var stringifyField = require('./field_stringify'); | ||
@@ -209,3 +206,3 @@ | ||
// Check constraints | ||
if (typeof value !== 'number' || safeIsNaN(value) || value < constraints.min || value > constraints.max) { | ||
if (typeof value !== 'number' || Number.isNaN(value) || value < constraints.min || value > constraints.max) { | ||
throw new Error( | ||
@@ -229,3 +226,3 @@ 'Constraint error, got value ' + value + ' expected range ' + | ||
// Check constraints | ||
if (safeIsNaN(numResult) || numResult < constraints.min || numResult > constraints.max) { | ||
if (Number.isNaN(numResult) || numResult < constraints.min || numResult > constraints.max) { | ||
throw new Error( | ||
@@ -315,3 +312,3 @@ 'Constraint error, got value ' + result + ' expected range ' + | ||
if (safeIsNaN(min) || safeIsNaN(max) || | ||
if (Number.isNaN(min) || Number.isNaN(max) || | ||
min < constraints.min || max > constraints.max) { | ||
@@ -331,3 +328,3 @@ throw new Error( | ||
if (safeIsNaN(repeatIndex) || repeatIndex <= 0) { | ||
if (Number.isNaN(repeatIndex) || repeatIndex <= 0) { | ||
throw new Error('Constraint error, cannot repeat at every ' + repeatIndex + ' time.'); | ||
@@ -348,3 +345,3 @@ } | ||
return safeIsNaN(+val) ? val : +val; | ||
return Number.isNaN(+val) ? val : +val; | ||
} | ||
@@ -882,3 +879,3 @@ | ||
} | ||
if (atoms.length > 2 || safeIsNaN(nthValue) || (nthValue < 1 || nthValue > 5)) { | ||
if (atoms.length > 2 || Number.isNaN(nthValue) || (nthValue < 1 || nthValue > 5)) { | ||
throw new Error('Constraint error, invalid dayOfWeek occurrence number (#)'); | ||
@@ -920,3 +917,3 @@ } | ||
// Check constraints | ||
if (typeof value !== 'number' || safeIsNaN(value) || value < constraints.min || value > constraints.max) { | ||
if (typeof value !== 'number' || Number.isNaN(value) || value < constraints.min || value > constraints.max) { | ||
throw new Error( | ||
@@ -923,0 +920,0 @@ 'Constraint error, got value ' + value + ' expected range ' + |
{ | ||
"name": "cron-parser", | ||
"version": "3.5.0", | ||
"version": "4.0.0", | ||
"description": "Node.js library for parsing crontab instructions", | ||
@@ -59,10 +59,9 @@ "main": "lib/parser.js", | ||
"dependencies": { | ||
"is-nan": "^1.3.2", | ||
"luxon": "^1.26.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.24.0", | ||
"eslint": "^7.32.0", | ||
"sinon": "^10.0.0", | ||
"tap": "^15.0.3", | ||
"tsd": "^0.14.0" | ||
"tap": "^15.0.9", | ||
"tsd": "^0.17.0" | ||
}, | ||
@@ -69,0 +68,0 @@ "engines": { |
@@ -10,3 +10,3 @@ cron-parser | ||
__Compatibility__ | ||
Node >= 0.8 | ||
Node >= 0.10 | ||
Typescript <= 4.2 | ||
@@ -13,0 +13,0 @@ |
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
1
139551
3989
- Removedis-nan@^1.3.2
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddunder-proto@1.0.0(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.5(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-nan@1.3.2(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedset-function-length@1.2.2(transitive)