Tests if a string is a FormString. Can also be used as a type guard.
The string to test.
True if the string is a FormString.
const id = 'L123-F4'; if (!isFormString(id)) { throw new Error('Not a FormString'); } WikibaseFormSnak.fromData('P5830', id); Copy
const id = 'L123-F4'; if (!isFormString(id)) { throw new Error('Not a FormString'); } WikibaseFormSnak.fromData('P5830', id);
Tests if a string is a FormString. Can also be used as a type guard.