mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 20:00:40 +00:00
14 lines
268 B
TypeScript
14 lines
268 B
TypeScript
import imageToBase64 from "image-to-base64";
|
|
|
|
export const encodeBase64 = async (url: string): Promise<string> => {
|
|
let response = "";
|
|
|
|
try {
|
|
response = await imageToBase64(url);
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
|
|
return response;
|
|
};
|