UNPKG

browsernizr

Version:

Modernizr wrapper for use with browserify

22 lines (20 loc) 429 B
/*! { "name": "ES6 Generators", "property": "generators", "authors": ["Michael Kachanovskyi"], "tags": ["es6"] } !*/ /* DOC Check if browser implements ECMAScript 6 Generators per specification. */ var Modernizr = require('./../../lib/Modernizr.js'); Modernizr.addTest('generators', function() { try { new Function('function* test() {}')(); } catch (e) { return false; } return true; });