jmap-kit
    Preparing search index...
    • Expands a URI template with parameters, and ensures that any parameters not used in the template are appended as query parameters to the resulting URL.

      This behaviour is not technically part of the JMAP specification, but it has been observed that some JMAP servers (such as Fastmail) provide non-compliant templates that do not use all parameters, and are assumed to be expected as query string parameters.

      Parameters

      • templateString: string

        The URI template string

      • params: Record<string, PrimitiveValue>

        An object containing parameter values to expand in the template

      Returns URL

      A URL object with the expanded template and any unused parameters as query params