Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class Grid {
- constructor(...drivers) {
- this._drivers = drivers || [];
- }
- addDriver(driver) {
- this._drivers.push(driver);
- }
- [Symbol.iterator]() {
- this._index = 0;
- return {
- next: () => {
- if (this._index == this._drivers.length) {
- return { done: true };
- }
- return {
- value: this._drivers[this._index++],
- done: false
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment