1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00
Files
joplin/packages/lib/utils/prefixWithHttps.ts

10 lines
199 B
TypeScript

const prefixWithHttps = (url: string) => {
if (!url.startsWith('http://') && !url.startsWith('https://')) {
return `https://${url}`;
} else {
return url;
}
};
export default prefixWithHttps;