We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0baa30 commit b833ab0Copy full SHA for b833ab0
src/generators/disposable.js
@@ -2,6 +2,9 @@ import that from "../that.js";
2
3
export default function disposable(value, dispose) {
4
let done = false;
5
+ if (typeof dispose !== "function") {
6
+ throw new Error("dispose is not a function");
7
+ }
8
return {
9
[Symbol.iterator]: that,
10
next: () => done ? {done: true} : (done = true, {done: false, value}),
0 commit comments