Skip to content

[feat] compose should handle deeply nested arrays #184

@jonathanong

Description

@jonathanong

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions