query
On this page

isStringLike

lib.strings.isStringLike

Docs pulled from | This Revision | about 2 hours ago


Check whether a value can be coerced to a string. The value must be a string, path, or attribute set.

String-like values can be used without explicit conversion in string interpolations and in most functions that expect a string.

Inputs

x
1. Function argument

Type

isStringLike :: a -> bool

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

isStringLike = x:
    isString x ||
    isPath x ||
    x ? outPath ||
    x ? __toString;