Open mhkeller opened 5 years ago
Hey @mhkeller!
node-copytext
is in pretty serious need of a re-write/clean-up, so what I'm thinking is we could add the ability to pass in your own include
or exclude
function that gets used (right now it's just a filter emulating Array.includes
) so users can go wild with whatever filtering logic they want. I'd prefer to try and keep it simple inside the library if possible! Then you could use Regex, globs, etc., anything that can act on an array of strings.
Re: 2 — I think it'd probably be best to either make it impossible to pass both (which is currently how it works) or to just guarantee that include
will always be followed by exclude
. I've seen a few glob libraries work this way and I think it's the only way to ensure sanity.
What do you think of this feature? Sometimes I have sheets that I prefix with a
_
that are internal. Or, you could only include final sheets with some other naming convention.I'm finally getting around to adding xlsx reading to indian ocean and was thinking of adding that ability to also be consistent with that lib's other include/exclude api.
It adds the complexity of: