UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

13 lines (11 loc) 562 B
import { Identifiers } from "../errors/Identifiers.mjs"; import { Result } from "@sapphire/result"; //#region src/lib/resolvers/string.ts function resolveString(parameter, options) { if (typeof options?.minimum === "number" && parameter.length < options.minimum) return Result.err(Identifiers.ArgumentStringTooShort); if (typeof options?.maximum === "number" && parameter.length > options.maximum) return Result.err(Identifiers.ArgumentStringTooLong); return Result.ok(parameter); } //#endregion export { resolveString }; //# sourceMappingURL=string.mjs.map