Socket
Socket
Sign inDemoInstall

feature-detect-es6

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    feature-detect-es6

Detect which ES6 features are available.


Version published
Weekly downloads
69K
decreased by-14.28%
Maintainers
1
Install size
14.3 kB
Created
Weekly downloads
 

Readme

Source

view on npm npm module downloads per month Build Status Dependency Status js-standard-style

feature-detect-es6

Detect which ES6 features are available.

Example

var detect = require('feature-detect-es6')

if (detect.class() && detect.arrowFunction()){
  // safe to run ES6 code natively..
} else {
  // run your transpiled ES5..
}

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.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


© 2015 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.

Keywords

FAQs

Last updated on 12 Oct 2015

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc