Lekcja 08 projekt auta cz1
This commit is contained in:
1 parent
8fc98ebf9d
commit
d60f8a91a7
1543 files changed
+255781
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
/** @type {GeneratorFunctionConstructor | false} */
|
||||
var cached;
|
||||
|
||||
/** @type {import('./index.js')} */
|
||||
module.exports = function getGeneratorFunction() {
|
||||
if (typeof cached === 'undefined') {
|
||||
try {
|
||||
// eslint-disable-next-line no-new-func
|
||||
cached = Function('return function* () {}')().constructor;
|
||||
} catch (e) {
|
||||
cached = false;
|
||||
}
|
||||
}
|
||||
return cached;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user