UNPKG

@ethersphere/bee-js

Version:
20 lines (19 loc) 594 B
/** * Validates that passed string is valid URL of Bee. * We support only HTTP and HTTPS protocols. * * @param url */ export declare function isValidBeeUrl(url: unknown): url is URL; /** * Validates that passed string is valid URL of Bee, if not it throws BeeArgumentError. * We support only HTTP and HTTPS protocols. * @param url * @throws BeeArgumentError if non valid URL */ export declare function assertBeeUrl(url: unknown): asserts url is URL; /** * Removes trailing slash out of the given string. * @param url */ export declare function stripLastSlash(url: string): string;