iwf
    Preparing search index...

    Class TabularDataSnak

    Class for the TabularDataSnak.

    Most used property of this type is P4150 (weather history).

    Hierarchy (View Summary)

    • Snak
      • TabularDataSnak
    Index
    • Parameters

      • snak: {
            datatype?: "tabular-data";
            datavalue?: { type: "string"; value: string };
            hash?: string;
            property: string;
            snaktype: "value" | "somevalue" | "novalue";
        }

        The snak for this class in JSON format.

      Returns TabularDataSnak

      If the input does not match this datatype's Wikidata schema.

      const snak = new TabularDataSnak(json);
      
    datatype: string = 'tabular-data'
    hash: string | undefined
    property: `P${number}`
    snaktype: "value" | "somevalue" | "novalue"
    value: string | undefined
    • Gets the link to the Wiki Commons page.

      Returns string

      The link to the Wiki Commons page.

    • get hasValue(): boolean

      Checks if the snak has a value.

      Returns boolean

      True if the snak has a value.

    • get internalID(): string

      Creates a unique ID for the Snak.

      Returns string

      The ID.

    • Returns {
          datatype?: "tabular-data";
          datavalue?: { type: "string"; value: string };
          hash?: string;
          property: string;
          snaktype: "value" | "somevalue" | "novalue";
      }

      The snak as JSON.

      const json = tabularSnak.toJSON();