swimsuit

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1
  • 0.2.0
    0

Package Sidebar

Install

npm i swimsuit

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • eddiemoore
  • seb