You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the filter plugin did not have the functionality I was hoping for, so I created my own plugin complete with tests and published to npm. I added it to the README for discoverability
Nice, thanks! Could you publish the code on GitHub as well, so people can collaborate on it?
And also: you should use is.convert a) if you are also passing in index and parent, and b) reusing it, with this setup is is better.
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
wooorm
changed the title
Add unist-util-flat-filter to readme.md
Add unist-util-flat-filter to list of utilities
Jan 24, 2020
Sweet! Thanks & congrats on your first unist utility! ✨
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that the
filterplugin did not have the functionality I was hoping for, so I created my own plugin complete with tests and published tonpm. I added it to the README for discoverability