@drupflare/workforce - v0.3.0
    Preparing search index...

    Function itemsOf

    • Unwraps the two shapes this API uses for a collection.

      Some endpoints answer with a bare array and others wrap it in { items }. Measured against the real API: GET /workers/scripts returns an array and GET /workers/scripts/:s/versions returns { items: [...] }. A pager that assumes one shape throws "result is not iterable" on the other, which is what the integration lane caught and the local plane did not.

      Type Parameters

      • T

      Parameters

      • result: unknown

      Returns T[]