Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

parseQuads

  • parseQuads(readable: Guarded<Readable>, options?: ParserOptions): Promise<Quad[]>
  • Helper function to convert a Readable into an array of quads.

    Parameters

    • readable: Guarded<Readable>

      The readable object.

    • options: ParserOptions = {}

      Options for the parser.

    Returns Promise<Quad[]>

    A promise containing the array of quads.

pushQuad

  • pushQuad(quads: Quad[] | Readable, subject: string | NamedNode, predicate: string | NamedNode, object: string | NamedNode | Literal): void
  • Generates a quad with the given subject/predicate/object and pushes it to the given array.

    Parameters

    • quads: Quad[] | Readable
    • subject: string | NamedNode
    • predicate: string | NamedNode
    • object: string | NamedNode | Literal

    Returns void

serializeQuads

  • serializeQuads(quads: Quad[], contentType?: string): Guarded<Readable>
  • Helper function for serializing an array of quads, with as result a Readable object.

    Parameters

    • quads: Quad[]

      The array of quads.

    • Optional contentType: string

      The content-type to serialize to.

    Returns Guarded<Readable>

    The Readable object.