Skip to main content

isString

Validates if the supplied input is a string.

Signature

isString(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is a string.

Example

import { isString } from "@tripetto/runner";

isString("1"); // Returns `true`
isString(1); // Returns `false`