Skip to main content

parse_npm_pkg

Function parse_npm_pkg 

Source
fn parse_npm_pkg(pkg_spec: &str) -> (Option<&str>, &str)
Expand description

Parse an npm package spec into (scope, name) with the @version stripped. @playwright/mcp@latest -> (Some("playwright"), "mcp"); @upstash/context7-mcp -> (Some("upstash"), "context7-mcp"); context7-mcp@1.0 -> (None, "context7-mcp").