rschmukler/agenda

View on GitHub
src/utils/processEvery.ts

Summary

Maintainability
A
0 mins
Test Coverage
import humanInterval = require('human-interval');

export function calculateProcessEvery(input: number | string = 5000): number {
    if (typeof input === 'number') return input;
    return (humanInterval(input) as number) || 5000;
}