UNPKG

@sapphire/framework

Version:

Discord bot framework built for advanced and amazing bots.

18 lines (16 loc) 661 B
import { __name } from '../../chunk-PAWJFY3S.mjs'; import { Result } from '@sapphire/result'; import { Identifiers } from '../errors/Identifiers.mjs'; 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); } __name(resolveString, "resolveString"); export { resolveString }; //# sourceMappingURL=string.mjs.map //# sourceMappingURL=string.mjs.map