Passed
Push — trunk ( 2f4e4b...9236fc )
by Christian
13:18 queued 12s
created

flushPromises.js ➔ flushPromises   A

Complexity

Conditions 3

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
const scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;
0 ignored issues
show
Bug introduced by
The variable setImmediate seems to be never declared. If this is a global, consider adding a /** global: setImmediate */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Bug introduced by
The variable setTimeout seems to be never declared. If this is a global, consider adding a /** global: setTimeout */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
2
3
export default function flushPromises() {
4
    return new Promise((resolve) => {
5
        scheduler(resolve);
6
    });
7
}
8