Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cron-parser

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cron-parser - npm Package Compare versions

Comparing version 3.5.0 to 4.0.0

2

component.json

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc