Miss any of our Open RFC calls?Watch the recordings here! »

sports

4.0.1 • Public • Published

about

Helps detect browser features.

setup

Find the latest version on the npm registry:

# Contains named exports for a range of newer browser features 
npm install sports

usage

Do I have the EventSource API available on this browser?

import { eventsource } from 'sports'
 
// Implicitly tries `'EventSource' in window`
if (eventsource()) {
  console.log('Fortunately yes')
}

What checks and features are available in all?

import * as sports from 'sports'
 
Object.entries(sports).forEach(([feature, check]) => {
  console.log(feature, check())
})

Keywords

none

Install

npm i sports

DownloadsWeekly Downloads

6

Version

4.0.1

License

Unlicense

Unpacked Size

6.89 kB

Total Files

6

Last publish

Collaborators

  • avatar