Socket
Socket
Sign inDemoInstall

enable

Package Overview
Dependencies
0
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    enable

Detect es6 features enable or not.


Version published
Weekly downloads
31K
decreased by-4.9%
Maintainers
2
Install size
9.94 kB
Created
Weekly downloads
 

Readme

Source

enable

NPM version build status Test coverage Gittip David deps node version npm download

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);
}

/* Example:
if (enable.generator) {
  console.log('supports generator: `function* a() {}`');
}
*/

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

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

Others:

  • generator
  • let
  • const

Test

$ npm install
$ npm test

Coverage

$ npm test-cov

Keywords

FAQs

Last updated on 11 Nov 2014

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