MCPcopy Create free account
hub / github.com/denoland/std / assertIsIterable

Function assertIsIterable

expect/_matchers.ts:539–546  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

537
538// deno-lint-ignore no-explicit-any
539function assertIsIterable(value: any): asserts value is Iterable<unknown> {
540 if (value == null) {
541 throw new AssertionError("The value is null or undefined");
542 }
543 if (typeof value[Symbol.iterator] !== "function") {
544 throw new AssertionError("The value is not iterable");
545 }
546}
547
548export function toMatch(
549 context: MatcherContext,

Callers 1

toContainEqualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected