@carto/airship-bridge
Version:
Airship bridge to other libs (CARTO VL, CARTO.js)
19 lines (18 loc) • 540 B
JavaScript
export function select(elementOrSelector) {
if (typeof elementOrSelector === 'string') {
return document.querySelector(elementOrSelector);
}
return elementOrSelector;
}
export function getColumnName(columnOrExpression) {
if (typeof columnOrExpression === 'string') {
return columnOrExpression;
}
return columnOrExpression.propertyName;
}
export function getExpression(columnOrExpression) {
if (typeof columnOrExpression === 'string') {
return null;
}
return columnOrExpression;
}