has-generators

1.0.1 • Public • Published

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')

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    7,499
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    7,499
  • 1.0.0
    0

Package Sidebar

Install

npm i has-generators

Weekly Downloads

7,499

Version

1.0.1

License

ISC

Last publish

Collaborators

  • nathan7