1.2.0 • Published 3 years ago

differential-browsers v1.2.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
3 years ago

NPM version

differential-browsers

💡 This library is a fork of Polymer/tools/packages/browser-capabilities, but the repository has been dead for two years. The biggest offender here is Anaheim edge that is now chromium based.

A JavaScript library that detects browser capabilities from a user agent string.

The following keywords are supported. See differential-browsers.ts for the latest browser support matrix.

KeywordDescription
pushHTTP/2 Server Push
serviceworkerService Worker API
modulesJavaScript Modules (including dynamic import() and import.meta)
es2015ECMAScript 2015 (aka ES6)
es2016ECMAScript 2016
es2017ECMAScript 2017
es2018ECMAScript 2018

TODO:

  • push is supported for <link rel="preload" ...>, but modulepreload is not available
  • es2019 - covering: flat and flatMap Array methods, try .. catchoptional binding,Object.fromEntries, stableArray.sort`, and more
  • es2020 - covering: optional chaining (?.), nullish coalescing (??), export * as namespace and BigInt, and more