UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

28 lines (20 loc) 481 B
import { SelfDescribingValue } from "./SelfDescribingValue.js"; /** * @template T * @extends Iterable<SelfDescribing> */ export class SelfDescribingValueIterator { #iterable; /** * * @param {Iterable<T>} iterable */ constructor(iterable) { this.#iterable = iterable; } * [Symbol.iterator]() { for (const el of this.#iterable) { yield new SelfDescribingValue(el); } } }