isString
Validates if the supplied input is a string.
Signature
isString(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is a string.
Example
import { isString } from "@tripetto/builder";
isString("1"); // Returns `true`
isString(1); // Returns `false`