@urban/is-generator

0.1.0 • Public • Published

is-generator

Tests whether a function is an generator.

Install

npm i @urban/is-generator

Usage

import isGenerator from '@urban/is-generator'

function * gen () {}
function noop () {}

isGenerator(gen) // => true
isGenerator(noop) // => false

License

The MIT License (MIT). Copyright (c) Urban Faubion.

Package Sidebar

Install

npm i @urban/is-generator

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • urban