No est谩ndar
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
El m茅todo isGenerator()
determina si una funci贸n es un generador.
Sintaxis
fun.isGenerator()
Descripci贸n
El m茅todo isGenerator()
determina si una funci贸n es un generador. Fue parte de una propuesta del proceso de estandarizaci贸n "Harmony", pero no fue incluido en la especificaci贸n ECMAScript 6.
Ejemplos
function f() {}
function* g() {
yield 42;
}
console.log('f.isGenerator() = ' + f.isGenerator()); // f.isGenerator() = false
console.log('g.isGenerator() = ' + g.isGenerator()); // g.isGenerator() = true
Especificaciones
No es parte de ninguna especificaci贸n. Implementado en JavaScript 1.8.6.
Compatibilidad con navegadores
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Caracter铆stica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Soporte b谩sico | Sin soporte | 5.0 (5.0) | Sin soporte | Sin soporte | Sin soporte |
Caracter铆stica | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Soporte b谩sico | Sin soporte | Sin soporte | 5.0 (5.0) | Sin soporte | Sin soporte | Sin soporte |