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

    Install

    npm i has-generators

    DownloadsWeekly Downloads

    48,200

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • nathan7