Skip to content

serapath/does-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

does-support

detects javascript environment features

The testable features will adapt and change over time based on what I perceive as important features that need to be distinguishable in terms of whether they are present or not. The goal is to adapt how other modules I write will solve their needs in different environments when it comes to supported features.

usage

npm install does-support

const supports = require('does-support')
/******************************************************************************
  USE
******************************************************************************/
const { BROWSER, NODE } = supports
if (WEB) console.log('is web')
if (NODE) console.log('is node')
/******************************************************************************
  OR
******************************************************************************/
if (require('does-support/-/browser')) console.log('is browser')
if (require('does-support/-/node')) console.log('is node')

About

detect javascript environment features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published