api: dynamic env reloading from path/url

This commit is contained in:
jj
2025-05-24 15:52:27 +00:00
parent e76ccd1941
commit ba2d266de7
5 changed files with 136 additions and 22 deletions

View File

@@ -52,3 +52,12 @@ export function splitFilenameExtension(filename) {
export function zip(a, b) {
return a.map((value, i) => [ value, b[i] ]);
}
export function isURL(input) {
try {
new URL(input);
return true;
} catch {
return false;
}
}