Create an iterator which yields a value a single time.
The value to wrap in an iterator.
A new iterator which yields the value a single time.
import { once } from '@lumino/algorithm';let stream = once(7);Array.from(stream); // [7] Copy
import { once } from '@lumino/algorithm';let stream = once(7);Array.from(stream); // [7]
Create an iterator which yields a value a single time.