ix
Version:
The Interactive Extensions for JavaScript
24 lines (22 loc) • 639 B
JavaScript
import { IterableX } from './iterablex.mjs';
/**
* Creates an iterable from the specified elements.
*
* @template TSource The type of the elements to create an iterable sequence.
* @param {...TSource[]} args The elements to turn into an iterable sequence.
* @returns {IterableX<TSource>} The iterable sequence created from the elements.
*/
export function of(...args) {
return new OfIterable(args);
}
/** @ignore */
export class OfIterable extends IterableX {
constructor(args) {
super();
this._args = args;
}
*[Symbol.iterator]() {
yield* this._args;
}
}
//# sourceMappingURL=of.mjs.map