bcfreeflight
    Preparing search index...

    Class QueryParser

    QueryParser handles parsing and retrieval of parameters from an object.

    Index

    Constructors

    Methods

    • Retrieves the value of a specific key from the provided parameters object.

      Parameters

      • params: Record<string, any>

        The object containing key-value pairs.

      • key: string

        The key whose associated value is to be retrieved.

      Returns any

      The value associated with the matching key, or undefined if the key is not found.

      Throws an error if params is null, key is null, or key is empty.

    • Parses an object, converting string representations of numeric values to actual numbers, and excluding keys named "uploadKey" (case-insensitive).

      Parameters

      • params: Record<string, any>

        The input object to parse. Should be a key-value pair of strings or other values.

      Returns Record<string, any>

      A new object with numeric strings converted to numbers, and excluding "uploadKey".

      Throws an error if params is null.

    • Decodes a Base64-encoded string and parses it into an object.

      Parameters

      • base64Body: string

        The Base64-encoded string to be decoded and parsed.

      Returns Record<string, any>

      The parsed object obtained from the decoded Base64 string.