Package: effect
Module: Predicate
Checks whether a value is a string.
When to use
Use when you need a Predicate guard to narrow an unknown value to a
string.
Details
Uses typeof input === "string".
Example (Guarding strings)
import { Predicate } from "effect"
const data: unknown = "hi"
if (Predicate.isString(data)) {
console.log(data.toUpperCase())
}
See
isNumberisBooleanRefinementSignature
declare const isString: (input: unknown) => input is string
Since v2.0.0