Function findSomanetProductById

  • Finds a SOMANET product by its product ID.

    This function resolves the input productId (number, string, or HardwareDescription) to a numeric ID and searches the somanetProducts array for a product with a matching ID.

    Returns

    The matching SomanetProduct object if found, or undefined if no match exists or if the input is invalid.

    Parameters

    • Optional productId: null | string | number | HardwareDescription

      The product identifier to look up. Can be:

      • A numeric product ID
      • A string representing the product ID
      • A HardwareDescription object
      • null or undefined, in which case the function returns undefined

    Returns SomanetProduct | undefined

Generated using TypeDoc