Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Searcher

An object for searching an NPM registry.

Searches the NPM registry via web API: https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md

Hierarchy

  • Searcher

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Searcher(repoUri?: string, cdnUri?: string): Searcher
  • Create a Searcher object.

    Parameters

    • Default value repoUri: string = "https://registry.npmjs.org/"

      The URI of the NPM registry to use.

    • Default value cdnUri: string = "https://unpkg.com"

      The URI of the CDN to use for fetching full package data.

    Returns Searcher

Properties

cdnUri

cdnUri: string

The URI of the CDN to use for fetching full package data.

repoUri

repoUri: string

The URI of the NPM registry to use.

Methods

fetchPackageData

  • Fetch package.json of a package

    Parameters

    • name: string

      The package name.

    • version: string

      The version of the package to fetch.

    Returns Promise<IJupyterLabPackageData | null>

searchExtensions

  • searchExtensions(query: string, page?: number, pageination?: number): Promise<ISearchResult>
  • Search for a jupyterlab extension.

    Parameters

    • query: string

      The query to send. keywords:"jupyterlab-extension" will be appended to the query.

    • Default value page: number = 0

      The page of results to fetch.

    • Default value pageination: number = 250

      The pagination size to use. See registry API documentation for acceptable values.

    Returns Promise<ISearchResult>

Generated using TypeDoc