@oazmi/kitchensink - v0.9.13
    Preparing search index...

    Interface PackagePseudoUrl

    a description of a parsed jsr/npm package, that somewhat resembles the properties of regular URL.

    interface PackagePseudoUrl {
        href: string;
        protocol: PackageUriProtocol;
        scope?: string;
        pkg: string;
        version?: string;
        pathname: string;
        host: string;
    }
    Index

    Properties

    href: string

    the full package string, compatible to use with the URL constructor.

    Note

    this string is IS uri-encoded. however, vs-code doc popup may decode the uri-encoded string, giving a deceptive representation.

    examples:

    • jsr:/@scope/package@version/pathname
    • jsr:/@scope/package
    • npm:/package@version/pathname
    • npm:/@scope/package@version
    • npm:/@scope/package@1.0%20-%201.2 // the version range is "1.0 - 1.2"
    • npm:/@scope/package@%5E29 // the version range is "^9"
    • node:/http
    • node:/fs/promises
    protocol: PackageUriProtocol
    scope?: string

    optional scope name.

    pkg: string

    name of the package. the reason why we call it "pkg" instead of "package" is because "package" is a reserved word in javascript.

    version?: string

    optional version string of the package.

    pathname: string

    the pathname of the subpath that is being accessed within the package. this will always begin with a leading slash ("/"), even if there is no subpath being accessed.

    host: string

    the host contains the full information about the package's string. that is, it has the optional scope information, the package name information, and the optional version information.

    Note

    this string is NOT uri-encoded, unlike href.