Skip to content

urban/is-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Tests whether a function is an generator.

Resources

License

Stars

Watchers

Forks

Packages

No packages published