@soundworks/core 4.0.0-alpha.11 → 4.0.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -186,6 +186,22 @@ class BaseSharedStateCollection {
|
|
|
186
186
|
find(func) {
|
|
187
187
|
return this._states.find(func);
|
|
188
188
|
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Iterable API for use in `for .. of` loops
|
|
192
|
+
*/
|
|
193
|
+
[Symbol.iterator]() {
|
|
194
|
+
let index = 0;
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
next: () => {
|
|
198
|
+
const value = this._states[index++];
|
|
199
|
+
const done = index >= this._states.length;
|
|
200
|
+
|
|
201
|
+
return { value, done };
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
189
205
|
}
|
|
190
206
|
|
|
191
207
|
export default BaseSharedStateCollection;
|