@metreeca/trio - v0.1.1
    Preparing search index...

    Function term

    • Maps each value of a Some input through an encoder into RDF terms.

      The shared spine of link and data: normalises the input to an array and applies encoder elementwise.

      Type Parameters

      • V

        The source value type

      • T extends Term

        The Term subtype produced by encoder

      Parameters

      • source: Some<V>

        The source value(s) to encode

      • encoder: (value: V) => T

        Maps a single source value to a term

      Returns readonly T[]

      The encoded terms, one per source value