backpack-ui
Version:
Lonely Planet's Components
17 lines (15 loc) • 473 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = providerImageSize;
/**
* Check for a size keyword within a provider's image path
* @param {String} imagePath Path of the image to check
* @param {String} size Size keyword to check
* @return {Boolean} Does the size match?
*/
function providerImageSize(imagePath, size) {
if (typeof size === "number") return false;
return imagePath.includes(size);
}
;