
Research
TeamPCP-Linked Supply Chain Attack Hits SAP CAP and Cloud MTA npm Packages
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
feature-detect-es6
Advanced tools
Detect which ES6 (ES2015 and above) features are available.
Example
var detect = require('feature-detect-es6')
if (detect.all('class', 'spread', 'let', 'arrowFunction')){
// safe to run ES6 code natively..
} else {
// run your transpiled ES5..
}
booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanReturns true if the class statement is available.
Kind: static method of feature-detect-es6
booleanReturns true if the arrow functions available.
Kind: static method of feature-detect-es6
booleanReturns true if the let statement is available.
Kind: static method of feature-detect-es6
booleanReturns true if the const statement is available.
Kind: static method of feature-detect-es6
booleanReturns true if the new Array features are available (exluding Array.prototype.values which has zero support anywhere).
Kind: static method of feature-detect-es6
booleanReturns true if the new functions of Object are available.
Kind: static method of feature-detect-es6
booleanReturns true if Map, WeakMap, Set and WeakSet are available.
Kind: static method of feature-detect-es6
booleanReturns true if generators are available.
Kind: static method of feature-detect-es6
booleanReturns true if Promise is available.
Kind: static method of feature-detect-es6
booleanReturns true if template strings are available.
Kind: static method of feature-detect-es6
booleanReturns true if Symbol is available.
Kind: static method of feature-detect-es6
booleanReturns true if destructuring is available.
Kind: static method of feature-detect-es6
booleanReturns true if the spread operator (...) is available.
Kind: static method of feature-detect-es6
booleanReturns true if default parameter values are available.
Kind: static method of feature-detect-es6
booleanReturns true if async functions are available.
Kind: static method of feature-detect-es6
booleanReturns true if all specified features are detected.
Kind: static method of feature-detect-es6
| Param | Type | Description |
|---|---|---|
| [...feature] | string | the features to detect. |
Example
var result = detect.all('class', 'spread', 'let', 'arrowFunction')
Β© 2015-18 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.
FAQs
Detect which ES6 (ES2015 and above) features are available
The npm package feature-detect-es6 receives a total of 25,124 weekly downloads. As such, feature-detect-es6 popularity was classified as popular.
We found that feature-detect-es6 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.