npm Registry API Client
    Preparing search index...

    Class MaintainerResource

    Represents an npm maintainer, providing access to their public profile and published packages via the npm registry API.

    // Get public profile
    const profile = await npm.maintainer('pilmee').info();
    console.log(profile.name, profile.email);

    // Get packages maintained by this user
    const result = await npm.maintainer('pilmee').packages();
    result.objects.forEach(o => console.log(o.package.name, o.package.version));

    // Paginate
    const page2 = await npm.maintainer('pilmee').packages({ size: 25, from: 25 });
    Index

    Methods

    • Returns the public avatar URL for this npm user when a public email is available.

      Internally searches for packages by the maintainer, extracts this user's public email from the first result's maintainers, and derives a Gravatar URL.

      GET /-/v1/search?text=maintainer:{username}&size=1

      Parameters

      • Optionalsignal: AbortSignal

        Optional AbortSignal to cancel the request

      Returns Promise<string | undefined>

      Gravatar image URL, or undefined when no public email is available

      const url = await npm.maintainer('pilmee').avatar();
      // 'https://www.gravatar.com/avatar/...'
    • Fetches the public profile of this npm user.

      Internally searches for packages by the maintainer and extracts this user's entry from the first result's maintainers — no authentication required.

      GET /-/v1/search?text=maintainer:{username}&size=1

      Parameters

      • Optionalsignal: AbortSignal

        Optional AbortSignal to cancel the request

      Returns Promise<NpmUser>

      The user profile with name and optional email. When the user has no published packages, name is the requested username and email is undefined.

      const profile = await npm.maintainer('pilmee').info();
      console.log(profile.name); // 'pilmee'
      console.log(profile.email); // 'pilmee@gmail.com'
    • Searches for all packages maintained by this user.

      GET /-/v1/search?text=maintainer:{username}

      Parameters

      • params: MaintainerPackagesParams = {}

        Optional pagination and scoring weights

      • Optionalsignal: AbortSignal

        Optional AbortSignal to cancel the request

      Returns Promise<NpmSearchResult>

      Search results with packages, scores, and total count

      const result = await npm.maintainer('pilmee').packages();
      console.log(`${result.total} packages`);
      result.objects.forEach(o => {
      console.log(o.package.name, o.package.version);
      });