• Forces any iterable or iterator to become an iterator. Will throw if this is not possible.

    Parameters

    • it: Iterable<any> | Iterator<any, any, undefined>

    Returns Iterator<any>

    Example

    import { forceIterator } from 'deleight/generators';
    const it = forceIterator([1, 2, 3, 4, 5]);