From 7069268db096ab0aa7a8839a3594efb2d1be8f86 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 4 Sep 2023 20:46:58 -0300 Subject: thumbs: new check-has-thumbs util, others throw for missing info --- src/write/bind-utilities.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/write') diff --git a/src/write/bind-utilities.js b/src/write/bind-utilities.js index c32035f1..942cce89 100644 --- a/src/write/bind-utilities.js +++ b/src/write/bind-utilities.js @@ -11,6 +11,7 @@ import {bindOpts} from '#sugar'; import {thumb} from '#urls'; import { + checkIfImagePathHasCachedThumbnails, getDimensionsOfImagePath, getThumbnailEqualOrSmaller, getThumbnailsAvailableForDimensions, @@ -54,6 +55,10 @@ export function bindUtilities({ bound.find = bindFind(wikiData, {mode: 'warn'}); + bound.checkIfImagePathHasCachedThumbnails = + (imagePath) => + checkIfImagePathHasCachedThumbnails(imagePath, thumbsCache); + bound.getDimensionsOfImagePath = (imagePath) => getDimensionsOfImagePath(imagePath, thumbsCache); -- cgit 1.3.0-6-gf8a5