Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export class Grid {
constructor(...drivers) {
this._drivers = drivers || [];
}
addDriver(driver) {
this._drivers.push(driver);
}
*[Symbol.iterator]() {
for (let i = 0, length = this._drivers.length; i < length; ++i) {
yield this._drivers[i];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment