@sapphire/framework
Version:
Discord bot framework built for advanced and amazing bots.
1 lines • 681 B
Source Map (JSON)
{"version":3,"file":"hyperlink.cjs","names":["Result","URL","Identifiers"],"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,QADeA,yBAAO,WAAW,IAAIC,aAAI,UAAU,CAAC,CACtC,aAAaC,2CAAY,uBAAuB"}