Package: effect
Module: Predicate
Checks whether a value is iterable.
When to use
Use when you need a Predicate guard before iterating an unknown value.
Details
Accepts strings as iterable and uses hasProperty for Symbol.iterator.
Example (Guarding iterables)
import { Predicate } from "effect"
const data: unknown = [1, 2, 3]
console.log(Predicate.isIterable(data))
See
isSetisMapSignature
declare const isIterable: (input: unknown) => input is Iterable<unknown>
Since v2.0.0