Skip to content

toArray

ts
function Set.toArray(target)

Example

ts
import { Set } from "@monstermann/set";

Set.toArray(Set.create([1, 2, 3])); // [1, 2, 3]
Set.toArray(Set.create(["a", "b"])); // ['a', 'b']
ts
import { Set } from "@monstermann/set";

pipe(Set.create([1, 2, 3]), Set.toArray()); // [1, 2, 3]
pipe(Set.create(["a", "b"]), Set.toArray()); // ['a', 'b']