enable
Detect es6 and es7
features enable or not.
Install
$ npm install enable --save
Usage
var enable = require('enable');
if (enable.<feature>) {
console.log(<feature> is supported);
}
List of features:
Object related:
- Object.is
- Object.assign
- Object.getOwnPropertySymbols
- Object.setPrototypeOf
String realted:
- String.raw
- String.fromCodePoint
- String.prototype.codePointAt
- String.prototype.normalize
- String.prototype.repeat
- String.prototype.startsWith
- String.prototype.endsWith
- String.prototype.contains
- String.prototype.anchor
- String.prototype.big
- String.prototype.bold
- String.prototype.fixed
- String.prototype.fontcolor
- String.prototype.fontsize
- String.prototype.italics
- String.prototype.link
- String.prototype.small
- String.prototype.strike
- String.prototype.sub
- String.prototype.sup
Number realted:
- Number.isFinite
- Number.isInteger
- Number.isSafeInteger
- Number.isNaN
- Number.EPSILON
- Number.MIN_SAFE_INTEGER
Math realted:
- Math.clz32
- Math.imul
- Math.sign
- Math.log10
- Math.log2
- Math.log1p
- Math.expm1
- Math.cosh
- Math.sinh
- Math.tanh
- Math.acosh
- Math.asinh
- Math.atanh
- Math.hypot
- Math.trunc
- Math.fround
- Math.cbrt
RefExp methods:
- RegExp.prototype.match
- RegExp.prototype.replace
- RegExp.prototype.split
- RegExp.prototype.search
Others:
- generator.
- let.
- const.
- Promise.
Test
$ npm install
$ npm test
Coverage
$ npm test-cov