UNPKG

@flex-development/pathe

Version:

Universal drop-in replacement for node:path

13 lines (12 loc) 403 B
import isURLObject from "#internal/is-url-object"; import { ERR_INVALID_ARG_TYPE } from "@flex-development/errnode"; function validateURLString(value, name) { if (isURLObject(value) || typeof value === "string") return true; throw new ERR_INVALID_ARG_TYPE(name, ["URL", "string"], value); } var validate_url_string_default = validateURLString; export { validate_url_string_default as default };