mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
12 lines
298 B
JavaScript
12 lines
298 B
JavaScript
|
const { validURL } = require("../utils/url");
|
||
|
const { scrapeGenericUrl } = require("./convert/generic");
|
||
|
|
||
|
async function processLink(link) {
|
||
|
if (!validURL(link)) return { success: false, reason: "Not a valid URL." };
|
||
|
return await scrapeGenericUrl(link);
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
processLink,
|
||
|
};
|