Skip to content

Function: npmRegistry()

npmRegistry(cwd?, options?): UrlBuilderImpl | undefined

The active npm registry (npm config get registry) as a chainable net.UrlBuilder, or undefined when npm is absent or prints no URL. A blank, null, omitted, or explicitly current cwd reuses the cached npm command; another resolved directory executes it directly. Environment options are evaluated on every call.

string | null

boolean

boolean

UrlBuilderImpl | undefined