{"library":"registry-auth-token","title":"registry-auth-token","description":"Retrieves npm registry authentication tokens from .npmrc or programmatic configuration. Current stable version 5.1.1 (Node >=14). Provides both token and type (Bearer/Basic). Also offers registry URL resolution for scopes. Lightweight, no dependencies, ships TypeScript definitions. Critical for tools that need to authenticate with npm registries programmatically.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install registry-auth-token"],"cli":null},"imports":["import { getAuthToken } from 'registry-auth-token'","import { getRegistryUrl } from 'registry-auth-token/registry-url'","import type { NpmConfig } from 'registry-auth-token'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { getAuthToken, getRegistryUrl } from 'registry-auth-token';\n\nconst token = getAuthToken();\nif (token) {\n  console.log('Token:', token.token);\n  console.log('Type:', token.type);\n} else {\n  console.log('No token found');\n}\n\nconst registryUrl = getRegistryUrl('@scope');\nconsole.log('Registry URL:', registryUrl);","lang":"typescript","description":"Fetches auth token for default registry and registry URL for a scope. Uses ESM imports as required since v5.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}