feature-detect-es6

WebJar for feature-detect-es6

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

feature-detect-es6
Last Version

Last Version

1.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

feature-detect-es6
WebJar for feature-detect-es6
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/75lb/feature-detect-es6

Download feature-detect-es6

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/feature-detect-es6/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>feature-detect-es6</artifactId>
    <version>1.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/feature-detect-es6/
implementation 'org.webjars.npm:feature-detect-es6:1.3.1'
// https://jarcasting.com/artifacts/org.webjars.npm/feature-detect-es6/
implementation ("org.webjars.npm:feature-detect-es6:1.3.1")
'org.webjars.npm:feature-detect-es6:jar:1.3.1'
<dependency org="org.webjars.npm" name="feature-detect-es6" rev="1.3.1">
  <artifact name="feature-detect-es6" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='feature-detect-es6', version='1.3.1')
)
libraryDependencies += "org.webjars.npm" % "feature-detect-es6" % "1.3.1"
[org.webjars.npm/feature-detect-es6 "1.3.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : array-back jar [1.0.3,2)

Project Modules

There are no modules declared in this project.

view on npm npm module downloads Build Status js-standard-style

feature-detect-es6

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

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

var result = detect.all('class', 'spread', 'let', 'arrowFunction')

© 2015-18 Lloyd Brookes <[email protected]>. Documented by jsdoc-to-markdown.

Versions

Version
1.3.1
1.3.0