Installations
npm install feature-detect-es6
Developer Guide
Typescript
No
Module System
N/A
Min. Node Version
>=0.10.0
Node Version
10.6.0
NPM Version
6.2.0
Score
97.9
Supply Chain
99.5
Quality
75.5
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
75lb
Download Statistics
Total Downloads
22,776,860
Last Day
3,752
Last Week
20,585
Last Month
223,215
Last Year
3,793,235
GitHub Statistics
24 Stars
44 Commits
7 Forks
5 Watching
1 Branches
2 Contributors
Package Meta Information
Latest Version
1.5.0
Package Id
feature-detect-es6@1.5.0
Size
4.02 kB
NPM Version
6.2.0
Node Version
10.6.0
Publised On
20 Jul 2018
Total Downloads
Cumulative downloads
Total Downloads
22,776,860
Last day
-29.7%
3,752
Compared to previous day
Last week
-59.6%
20,585
Compared to previous week
Last month
-39.2%
223,215
Compared to previous month
Last year
39.7%
3,793,235
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
2
feature-detect-es6
Detect which ES6 (ES2015 and above) features are available.
Example
1var detect = require('feature-detect-es6') 2 3if (detect.all('class', 'spread', 'let', 'arrowFunction')){ 4 // safe to run ES6 code natively.. 5} else { 6 // run your transpiled ES5.. 7}
- feature-detect-es6
- .class() ⇒
boolean
- .arrowFunction() ⇒
boolean
- .let() ⇒
boolean
- .const() ⇒
boolean
- .newArrayFeatures() ⇒
boolean
- .newObjectFeatures() ⇒
boolean
- .collections() ⇒
boolean
- .generators() ⇒
boolean
- .promises() ⇒
boolean
- .templateStrings() ⇒
boolean
- .symbols() ⇒
boolean
- .destructuring() ⇒
boolean
- .spread() ⇒
boolean
- .defaultParamValues() ⇒
boolean
- .asyncFunctions() ⇒
boolean
- .all() ⇒
boolean
- .class() ⇒
detect.class() ⇒ boolean
Returns true if the class
statement is available.
Kind: static method of feature-detect-es6
detect.arrowFunction() ⇒ boolean
Returns true if the arrow functions available.
Kind: static method of feature-detect-es6
detect.let() ⇒ boolean
Returns true if the let
statement is available.
Kind: static method of feature-detect-es6
detect.const() ⇒ boolean
Returns true if the const
statement is available.
Kind: static method of feature-detect-es6
detect.newArrayFeatures() ⇒ boolean
Returns true if the new Array features are available (exluding Array.prototype.values
which has zero support anywhere).
Kind: static method of feature-detect-es6
detect.newObjectFeatures() ⇒ boolean
Returns true if the new functions of Object are available.
Kind: static method of feature-detect-es6
detect.collections() ⇒ boolean
Returns true if Map
, WeakMap
, Set
and WeakSet
are available.
Kind: static method of feature-detect-es6
detect.generators() ⇒ boolean
Returns true if generators are available.
Kind: static method of feature-detect-es6
detect.promises() ⇒ boolean
Returns true if Promise
is available.
Kind: static method of feature-detect-es6
detect.templateStrings() ⇒ boolean
Returns true if template strings are available.
Kind: static method of feature-detect-es6
detect.symbols() ⇒ boolean
Returns true if Symbol
is available.
Kind: static method of feature-detect-es6
detect.destructuring() ⇒ boolean
Returns true if destructuring is available.
Kind: static method of feature-detect-es6
detect.spread() ⇒ boolean
Returns true if the spread operator (...
) is available.
Kind: static method of feature-detect-es6
detect.defaultParamValues() ⇒ boolean
Returns true if default parameter values are available.
Kind: static method of feature-detect-es6
detect.asyncFunctions() ⇒ boolean
Returns true if async functions are available.
Kind: static method of feature-detect-es6
detect.all() ⇒ boolean
Returns true if all specified features are detected.
Kind: static method of feature-detect-es6
Param | Type | Description |
---|---|---|
[...feature] | string | the features to detect. |
Example
1var result = detect.all('class', 'spread', 'let', 'arrowFunction')
© 2015-18 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 5 are checked with a SAST tool
Reason
19 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-xf5p-87ch-gxw2
- Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj
- Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
Score
1.7
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to feature-detect-es6
@stdlib/assert-has-tostringtag-support
Detect native Symbol.toStringTag support.
@stdlib/assert-has-float64array-support
Detect native Float64Array support.
@stdlib/assert-has-float32array-support
Detect native Float32Array support.
@stdlib/assert-has-symbol-support
Detect native Symbol support.