You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-generators

feature-detect generators

1.0.1
latest
Version published
Weekly downloads
12K
23.11%
Maintainers
1
Weekly downloads
 
Created

has-generators

feature-detect generators.

Installation

npm install has-generators

API

require('has-generators') -> Boolean

  • true: Your runtime supports generators! Sweet!
  • false: Your runtime doesn't support generators, aww :(

Example

// foo.js
module.exports = require('has-generators') ? require('./foo.es6') : require('./foo.es5')

FAQs

Package last updated on 21 Jan 2015

Did you know?

Socket

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