From f156559e7b08374bf6860b11e2a25c483de03abe Mon Sep 17 00:00:00 2001 From: Rangga Fajar Oktariansyah <86386385+FajarKim@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:32:51 +0700 Subject: [PATCH] refactor(getData): image fetching to use import syntax --- src/getData.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getData.ts b/src/getData.ts index 9eebd07..3f14f7f 100644 --- a/src/getData.ts +++ b/src/getData.ts @@ -1,7 +1,7 @@ import millify from "millify"; import stats from "./fetcher/stats"; import repositoryStats from "./fetcher/repositoryStats"; -const base64ImageFetcher = require("node-base64-image"); +import { encode } from "node-base64-image"; /** * Type representing GitHub user information. @@ -61,7 +61,7 @@ async function getData(username: string): Promise { const output = { username: user.login, name: user.name, - picture: await base64ImageFetcher.encode(`${user.avatarUrl}&s=200`, { + picture: await encode(`${user.avatarUrl}&s=200`, { string: true }), public_repos: millify(user.repositories.totalCount),