41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.CronSecond = void 0;
|
|
const CronField_1 = require("./CronField");
|
|
const MIN_SECOND = 0;
|
|
const MAX_SECOND = 59;
|
|
const SECOND_CHARS = Object.freeze([]);
|
|
/**
|
|
* Represents the "second" field within a cron expression.
|
|
* @class CronSecond
|
|
* @extends CronField
|
|
*/
|
|
class CronSecond extends CronField_1.CronField {
|
|
static get min() {
|
|
return MIN_SECOND;
|
|
}
|
|
static get max() {
|
|
return MAX_SECOND;
|
|
}
|
|
static get chars() {
|
|
return SECOND_CHARS;
|
|
}
|
|
/**
|
|
* CronSecond constructor. Initializes the "second" field with the provided values.
|
|
* @param {SixtyRange[]} values - Values for the "second" field
|
|
* @param {CronFieldOptions} [options] - Options provided by the parser
|
|
*/
|
|
constructor(values, options) {
|
|
super(values, options);
|
|
this.validate();
|
|
}
|
|
/**
|
|
* Returns an array of allowed values for the "second" field.
|
|
* @returns {SixtyRange[]}
|
|
*/
|
|
get values() {
|
|
return super.values;
|
|
}
|
|
}
|
|
exports.CronSecond = CronSecond;
|