dataforseo-mcp-server
Version:
CLI and MCP server for DataForSEO API — browse documentation and make authenticated API requests
18 lines • 574 B
JavaScript
import { DOCS_BASE_URL } from "../../config/index.js";
export function normalizeDocPath(input) {
let path = input.trim();
if (path.startsWith("http://") || path.startsWith("https://")) {
const url = new URL(path);
path = url.pathname;
}
path = path.replace(/^\/v3\//, "").replace(/^\//, "");
if (!path.endsWith(".md")) {
path = `${path}.md`;
}
return path;
}
export function buildDocUrl(path) {
const normalized = normalizeDocPath(path);
return `${DOCS_BASE_URL}/${normalized}/`;
}
//# sourceMappingURL=path.js.map