Describe the feature
|
const funcs = middleware.flat() |
.flat() takes depth parameter, which defaults to 1 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat. Developers should expect it to be Infinity as currently this function would (probably, I haven't checked) break with an argument like compose([ [fn1, fn2] ])
this was not supported before the introduction of .flat() so is not a bug