Add unist-util-flat-filter to list of utilities by crutchcorn · Pull Request #26 · syntax-tree/unist (original) (raw)
Sweet!
I am using is.convert, however
Right! What I meant was that, the way you are using is.convert currently, it’s better to use is.
If you want to use is.convert, you should a) convert it in flatFilter, b) pass the new converted function into flatFilterGeneric, and c) make sure that that converted functions get node, index, parent when called.
a) and b) would make it more performant, c) would make sure the user-provided test works exactly the same in your project as all other unist utilities