Skip to content

Commit

Permalink
change debug prefix from [Textblock] to [TB]
Browse files Browse the repository at this point in the history
  • Loading branch information
kcargile committed Sep 12, 2024
1 parent 2d962e4 commit 3a730da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/textblock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const Textblock = (blocks: TextblockTarget[], options?: TextblockOptions)

if (typeof window === "undefined" || typeof document === "undefined") {
console.error(
"[Textblock] A valid DOM is required. If you're using SSR, be sure to initialize Textblock on the client."
"[TB] A valid DOM is required. If you're using SSR, be sure to initialize Textblock on the client."
);
return null;
}
Expand Down Expand Up @@ -198,7 +198,7 @@ export const Textblock = (blocks: TextblockTarget[], options?: TextblockOptions)
*/
function onLoad(blocks: TextblockTarget[]) {
if (blocks.length === 0) {
debug && console.debug("[Textblock] No blocks were provided. Are you sure your configuration is correct?");
debug && console.debug("[TB] No blocks were provided. Are you sure your configuration is correct?");
return;
}

Expand All @@ -207,7 +207,7 @@ export const Textblock = (blocks: TextblockTarget[], options?: TextblockOptions)
(el): el is HTMLElement => el instanceof HTMLElement
);

debug && console.debug(`[Textblock] Found ${elements.length} elements matching the ${b.target} selector.`);
debug && console.debug(`[TB] Found ${elements.length} elements matching the ${b.target} selector.`);

elements.forEach((e) => {
const measures = calculateTypographyMeasurements(b, e);
Expand All @@ -234,7 +234,7 @@ export const Textblock = (blocks: TextblockTarget[], options?: TextblockOptions)
*/
function onResize(callback: (blocks: TextblockTarget[]) => void) {
if (blocks.length === 0) {
debug && console.debug("[Textblock] No blocks were provided. Are you sure your configuration is correct?");
debug && console.debug("[TB] No blocks were provided. Are you sure your configuration is correct?");
return;
}

Expand Down

0 comments on commit 3a730da

Please sign in to comment.