Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function tickCount(scale, count, minStep) {
var step;
if (isNumber(count) && minStep != null) {
count = Math.min(count, ~~(span(scale.domain()) / minStep) || 1);
}
if (isObject(count)) {
step = count.step;
count = count.interval;
}
if (isString(count)) {
count = timeInterval(count, scale.type)
|| error('Only time and utc scales accept interval strings.');
if (step) count = count.every(step);
}
return count;
}