Koa: Change * (asterisk) position in generator declarations in the docs

Created on 22 Aug 2016  路  2Comments  路  Source: koajs/koa

In the docs, we are declaring generators like this: function *() { ...

However, function and * are part of the same keyword. So, the correct way to declare a generator is like this: function* () {... or like function*() {...

Reference:
Mozilla Developer Network JS Docs
Airbnb's JavaScript Style Guide

Most helpful comment

agreed, these kinds of issues aren't helpful or productive sorry! Maintainers should be able to focus on what really matters.

All 2 comments

Both function* and function * works the same.
This is just a matter of style, not functionality, and since Koa 2.x is using async/await instead of generators in my opinion this is not important at all.

agreed, these kinds of issues aren't helpful or productive sorry! Maintainers should be able to focus on what really matters.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheRav3n picture TheRav3n  路  3Comments

edahlseng picture edahlseng  路  3Comments

ke1Del picture ke1Del  路  3Comments

wlingke picture wlingke  路  3Comments

tvq picture tvq  路  4Comments