mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 23:21:04 +00:00
22 lines
423 B
JavaScript
22 lines
423 B
JavaScript
/*!
|
|
{
|
|
"name": "ES6 Generators",
|
|
"property": "generators",
|
|
"authors": ["Michael Kachanovskyi"],
|
|
"tags": ["es6"]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Check if browser implements ECMAScript 6 Generators per specification.
|
|
*/
|
|
define(['Modernizr'], function(Modernizr) {
|
|
Modernizr.addTest('generators', function() {
|
|
try {
|
|
new Function('function* test() {}')();
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
return true;
|
|
});
|
|
});
|