Package Exports
- does-support
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (does-support) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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')