Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cron-descriptor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cron Expression Descriptor
A JavaScript library that converts cron expressions into human readable strings.
Installation
npm install cron-expression-descriptorUsage
import { getDescription, ExpressionDescriptor } from 'cron-expression-descriptor';
// Simple usage
const description = getDescription('0 9 * * MON-FRI');
console.log(description); // "At 09:00, Monday through Friday"
// With options
const descriptor = new ExpressionDescriptor('0 9 * * MON-FRI', {
use24hourTimeFormat: false,
verbose: true
});
console.log(descriptor.getDescription()); // "At 09:00 AM, Monday through Friday"API
getDescription(expression, options?)
Returns a human readable description of the cron expression.
ExpressionDescriptor
Main class for describing cron expressions with various options.
Options
use24hourTimeFormat: boolean - Use 24-hour time format (default: false)verbose: boolean - Include more descriptive text (default: false)dayOfWeekStartIndexZero: boolean - Start day of week from 0 (Sunday) instead of 1 (default: true)casingType: 'sentence' | 'title' | 'lowercase' - Control output casing (default: 'sentence')
License
MIT