hammerspoon2-docs
    Preparing search index...

    Function urlParts

    • Parse a URL into its component parts. Returns an object containing only the fields present in the URL. The queryItems field is an array of {name, value} objects from the query string.

      Parameters

      • url: string

        The URL string to parse.

      Returns Record<string, any> | null

      An object with any of the fields: scheme, host, port, user, password, path, query, fragment, queryItems. Returns null if the URL is unparseable.