Comparing version 9.0.0-dev.2 to 9.0.0-dev.3
@@ -243,3 +243,3 @@ declare module "helpers/minitz" { | ||
year: number; | ||
constructor(d?: CronDate | Date | string, tz?: string | number); | ||
constructor(d?: CronDate | Date | string | null, tz?: string | number); | ||
/** | ||
@@ -358,3 +358,3 @@ * Check if the given date is the nth occurrence of a weekday in its month. | ||
*/ | ||
nextRun(prev?: CronDate | Date | string): Date | null; | ||
nextRun(prev?: CronDate | Date | string | null): Date | null; | ||
/** | ||
@@ -367,3 +367,3 @@ * Find next n runs, based on supplied date. Strips milliseconds. | ||
*/ | ||
nextRuns(n: number, previous: Date | string): Date[]; | ||
nextRuns(n: number, previous?: Date | string): Date[]; | ||
/** | ||
@@ -445,2 +445,6 @@ * Return the original pattern, if there was one | ||
/** | ||
* Returns number of runs left, undefined = unlimited | ||
*/ | ||
runsLeft(): number | undefined; | ||
/** | ||
* Called when it's time to trigger. | ||
@@ -447,0 +451,0 @@ * Checks if all conditions are currently met, |
@@ -118,3 +118,3 @@ // src/helpers/minitz.ts | ||
parse() { | ||
if (!(typeof this.pattern === "string")) { | ||
if (!(typeof this.pattern === "string" || this.pattern instanceof String)) { | ||
throw new TypeError("CronPattern: Pattern has to be of type string."); | ||
@@ -345,2 +345,5 @@ } | ||
} | ||
if (split[0] === "") { | ||
split[0] = "*"; | ||
} | ||
let start = 0; | ||
@@ -1068,2 +1071,8 @@ if (split[0] !== "*") { | ||
/** | ||
* Returns number of runs left, undefined = unlimited | ||
*/ | ||
runsLeft() { | ||
return this._states.maxRuns; | ||
} | ||
/** | ||
* Called when it's time to trigger. | ||
@@ -1070,0 +1079,0 @@ * Checks if all conditions are currently met, |
@@ -148,3 +148,3 @@ var base64 = (() => { | ||
parse() { | ||
if (!(typeof this.pattern === "string")) { | ||
if (!(typeof this.pattern === "string" || this.pattern instanceof String)) { | ||
throw new TypeError("CronPattern: Pattern has to be of type string."); | ||
@@ -375,2 +375,5 @@ } | ||
} | ||
if (split[0] === "") { | ||
split[0] = "*"; | ||
} | ||
let start = 0; | ||
@@ -1098,2 +1101,8 @@ if (split[0] !== "*") { | ||
/** | ||
* Returns number of runs left, undefined = unlimited | ||
*/ | ||
runsLeft() { | ||
return this._states.maxRuns; | ||
} | ||
/** | ||
* Called when it's time to trigger. | ||
@@ -1100,0 +1109,0 @@ * Checks if all conditions are currently met, |
{ | ||
"name": "croner", | ||
"version": "9.0.0-dev.2", | ||
"version": "9.0.0-dev.3", | ||
"description": "Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.", | ||
@@ -5,0 +5,0 @@ "author": "Hexagon <github.com/hexagon>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
178716
3979