@urban/is-generator
v0.1.0
Published
Tests whether a function is an generator.
Downloads
3
Readme
is-generator
Tests whether a function is an generator.
Install
npm i @urban/is-generatorUsage
import isGenerator from '@urban/is-generator'
function * gen () {}
function noop () {}
isGenerator(gen) // => true
isGenerator(noop) // => falseLicense
The MIT License (MIT). Copyright (c) Urban Faubion.
