iwf
    Preparing search index...

    Function isFormString

    • Tests if a string is a FormString. Can also be used as a type guard.

      Parameters

      • string_: string

        The string to test.

      Returns string_ is `L${number}-F${number}`

      True if the string is a FormString.

      const id = 'L123-F4';
      if (!isFormString(id)) {
      throw new Error('Not a FormString');
      }
      WikibaseFormSnak.fromData('P5830', id);