We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isString is a type guard that lets Typescript know that the variable passed in is a string.
string
candidate: unknown
Supply any variable to test if it’s a string or not.
A type predicate for a string (candidate is string).
candidate is string
import { isString } from '@revolutionarygamesco/common' isString('hello!') // true isString(42) // false isString(['hello!']) // false isString({ a: 'hello!' }) // false