Function toObjectTerm

  • Converts an object term when needed.

    Parameters

    • object: string

      Object to potentially transform.

    • Optional preferLiteral: boolean

      Whether strings are converted to literals or named nodes.

    Returns NamedNode

  • Type Parameters

    • T extends Term

    Parameters

    • object: T
    • Optional preferLiteral: boolean

    Returns T

  • Type Parameters

    • T extends Term

    Parameters

    • object: string | T
    • Optional preferLiteral: boolean

    Returns T | NamedNode