swimsuit
v1.0.0
Published
Detect features using Promise
Downloads
3
Readme
Swimsuit
Detect features using Promise
Usage
Add a test
import Swimsuit from 'swimsuit'
Swimsuit.supports('websockets', () => {
return typeof window !== 'undefined' && typeof window.WebSocket !== 'undefined'
})
Check new support
Swimsuit.websockets.then(() => {
// It supports websockets
}).catch(() => {
// It doesn't support websockets
})