Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@f/is-generator

micro-js75MIT1.3.2

Check if generator.

readme

is-generator

Build status Git tag NPM version Code style

Check if generator.

Installation

$ npm install @f/is-generator

Usage

var isGenerator = require('@f/is-generator')

isGenerator(function * () {
  yield 1
}) // => true

API

isGenerator(obj)

  • obj - object to test

Returns: boolean

License

MIT