UNPKG

@tractorzoom/equipment-attributes

Version:

Source of truth for equipment attributes by category

24 lines (23 loc) 630 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getLocation = void 0; const getLocation = (props, includeCity = false) => { let location = ''; if (includeCity && props.city) { location += `${props.city}`; } if (props.state) { if (includeCity && location.length) { location += ', '; } location += props.state; } if (props.distance) { if (location.length) { location += ' - '; } location += `${props.distance.toFixed(0)} mi`; } return location; }; exports.getLocation = getLocation;