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
It would be awesome to allow an optional constructor in the options, to return whatever types the user really needs, ie : an array of vfile instead of an array of paths.
I would like to keep tiny glob as simple as possible. What would a implementation for this look like and what are the benefits? It's easy to map the returned array to get basename, extension etc.
Hi @terkelg !
I do agree that mapping on the returned array is pretty easy in term of coding, but i did believe that your package's implementation was all about performances !?
To load a vfile, i need the full path of a file.
So right now, the implementation is allready doing a full re-map on the matched elements just to return their absolute path.
So mapping again on all the matched elements returned by glob to convert them to vfile.. and it would be 2 unnecessary loops involved.
I would love to see some code, but I can't promise I'll merge it into master. All PRs are very welcome.
Can you do it without introducing dependencies?
zipang
added a commit
to zipang/tiny-glob
that referenced
this issue
Jul 12, 2018
It would be awesome to allow an optional constructor in the options, to return whatever types the user really needs, ie : an array of vfile instead of an array of paths.
Example :
The text was updated successfully, but these errors were encountered: