@metreeca/mime
    Preparing search index...

    Function validate

    • Creates a task admitting only the JSON-LD resource descriptions a shape accepts.

      A description the shape rejects is logged with its violations and dropped. A single malformed resource costs only itself, not the run, and later stages see only descriptions that conform to the shape. Feeds that must not lose a resource are better validated at the sink, where a rejection fails the run.

      Type Parameters

      • S extends Lazy<ResourceShape>

        The type of the resource shape the descriptions are validated against

      Parameters

      • shape: S

        The resource shape the descriptions are validated against

      Returns Task<unknown, State<S>>

      A task forwarding the JSON-LD descriptions shape accepts and dropping the others

      RangeError While the feed is consumed, if shape is malformed