UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

23 lines (22 loc) 428 B
/*! { "name": "ES6 Arrow Functions", "property": "arrow", "authors": ["Vincent Riemer"], "tags": ["es6"] } !*/ /* DOC Check if browser implements ECMAScript 6 Arrow Functions per specification. */ define(['Modernizr'], function(Modernizr) { Modernizr.addTest('arrow', function() { try { // eslint-disable-next-line eval('()=>{}'); } catch (e) { return false; } return true; }); });