@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
1 lines • 647 B
Source Map (JSON)
{"version":3,"file":"hyperlink.mjs","names":[],"sources":["../../../../src/lib/resolvers/hyperlink.ts"],"sourcesContent":["import { Result } from '@sapphire/result';\nimport { URL } from 'node:url';\nimport { Identifiers } from '../errors/Identifiers';\n\nexport function resolveHyperlink(parameter: string): Result<URL, Identifiers.ArgumentHyperlinkError> {\n\tconst result = Result.from(() => new URL(parameter));\n\treturn result.mapErr(() => Identifiers.ArgumentHyperlinkError) as Result<URL, Identifiers.ArgumentHyperlinkError>;\n}\n"],"mappings":";;;;;AAIA,SAAgB,iBAAiB,WAAoE;AAEpG,QADe,OAAO,WAAW,IAAI,IAAI,UAAU,CAAC,CACtC,aAAa,YAAY,uBAAuB"}