MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isIterable

Function isIterable

packages/agent-core/src/di/lifecycle.ts:170–176  ·  view source on GitHub ↗
(arg: unknown)

Source from the content-addressed store, hash-verified

168}
169
170function isIterable<T>(arg: unknown): arg is Iterable<T> {
171 return (
172 typeof arg === 'object' &&
173 arg !== null &&
174 typeof (arg as { [Symbol.iterator]?: unknown })[Symbol.iterator] === 'function'
175 );
176}
177
178export function disposeIfDisposable<T extends IDisposable | object>(
179 disposables: Array<T>,

Callers 1

disposeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected