UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

12 lines (10 loc) 392 B
import { Identifiers } from "../errors/Identifiers.mjs"; import { Result } from "@sapphire/result"; import { URL } from "node:url"; //#region src/lib/resolvers/hyperlink.ts function resolveHyperlink(parameter) { return Result.from(() => new URL(parameter)).mapErr(() => Identifiers.ArgumentHyperlinkError); } //#endregion export { resolveHyperlink }; //# sourceMappingURL=hyperlink.mjs.map