1.0.0 • Published 9 years ago

swimsuit v1.0.0

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

Swimsuit

Detect features using Promise

Join the chat at https://gitter.im/swimsuit/swimsuit Dependency Status Build Status Code Quality Code Coverage

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
})