cronstrue 3.32.0 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -242,6 +242,7 @@ var CronParser = (function () {
242
242
  this.validateAnyRanges(parsed);
243
243
  };
244
244
  CronParser.prototype.validateAnyRanges = function (parsed) {
245
+ parsed.forEach(function (part) { return rangeValidator_1.default.stepRange(part); });
245
246
  rangeValidator_1.default.secondRange(parsed[0]);
246
247
  rangeValidator_1.default.minuteRange(parsed[1]);
247
248
  rangeValidator_1.default.hourRange(parsed[2]);
@@ -9206,6 +9207,13 @@ function assert(value, message) {
9206
9207
  var RangeValidator = (function () {
9207
9208
  function RangeValidator() {
9208
9209
  }
9210
+ RangeValidator.stepRange = function (parse) {
9211
+ var parsed = parse.split(',');
9212
+ for (var i = 0; i < parsed.length; i++) {
9213
+ var step = parsed[i].split('/')[1];
9214
+ assert(step === undefined || !/^0+$/.test(step), 'step value must be greater than 0');
9215
+ }
9216
+ };
9209
9217
  RangeValidator.secondRange = function (parse) {
9210
9218
  var parsed = parse.split(',');
9211
9219
  for (var i = 0; i < parsed.length; i++) {