We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586aa02 commit 03cc8ebCopy full SHA for 03cc8eb
1 file changed
src/getData.ts
@@ -1,7 +1,7 @@
1
import millify from "millify";
2
import stats from "./fetcher/stats";
3
import repositoryStats from "./fetcher/repositoryStats";
4
-const base64ImageFetcher = require("node-base64-image");
+import { encode } from "node-base64-image";
5
6
/**
7
* Type representing GitHub user information.
@@ -61,7 +61,7 @@ async function getData(username: string): Promise<GetData> {
61
const output = {
62
username: user.login,
63
name: user.name,
64
- picture: await base64ImageFetcher.encode(`${user.avatarUrl}&s=200`, {
+ picture: await encode(`${user.avatarUrl}&s=200`, {
65
string: true
66
}),
67
public_repos: millify(user.repositories.totalCount),
0 commit comments