MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeSiteUrl

Function normalizeSiteUrl

apps/sim/connectors/wordpress/wordpress.ts:16–18  ·  view source on GitHub ↗

* Strips protocol prefix and trailing slashes from a site URL so the * WordPress.com API receives a bare domain (e.g. "mysite.wordpress.com").

(raw: string)

Source from the content-addressed store, hash-verified

14 * WordPress.com API receives a bare domain (e.g. "mysite.wordpress.com").
15 */
16function normalizeSiteUrl(raw: string): string {
17 return raw.replace(/^https?:\/\//, '').replace(/\/+$/, '')
18}
19
20const POSTS_PER_PAGE = 20
21

Callers 1

wordpress.tsFile · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected