koajs / compose

Middleware composition utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexpected identifier - `of`

vjpr opened this issue · comments

This makes Node v4 a requirement which is not mentioned anywhere.

Shame to break Node 0.12.x support for such a minor syntax change, seeing as Koa@2 supports 0.12.x.

koa@2 requires node@4+

@coderhaoxin Would you consider making the changes to just koa-compose? It'd be a bummer to duplicate all the code when it'd be nice just to re-use this library for arbitrary (non-Koa specific) async middleware.

Would you consider making the changes to just koa-compose?

@blakeembrey I don't know what you meant. :) 😢

This module is koa-compose, not koa. Would you consider making the code here ES5 instead of ES6 so that node <= 0.12 can use it? I'd like to use the module without replicating it for my own uses.

@jonathanong we need change for of to normal for loop!

Should we add node <= 0.12 to the travis ?

Thanks! The only other piece is the const. I'd love if you could test down to 0.10 too.

For reference, I want to use it for a HTTP request library (serviejs/popsicle#49) and have written a corresponding type definition (https://github.com/typed-typings/npm-koa-compose/blob/master/index.d.ts) in case you're interested in supporting TypeScript users in the module.