@data-ui/sparkline
Version:
React + d3 library for creating sparklines
27 lines (21 loc) • 557 B
JavaScript
;
exports.__esModule = true;
exports.componentName = componentName;
exports.isSeries = isSeries;
exports.isReferenceLine = isReferenceLine;
exports.isBandLine = isBandLine;
function componentName(component) {
if (component && component.type) {
return component.type.displayName || component.type.name || 'Component';
}
return '';
}
function isSeries(name) {
return /series/gi.test(name);
}
function isReferenceLine(name) {
return /referenceline/gi.test(name);
}
function isBandLine(name) {
return /bandline/gi.test(name);
}