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 really like the way sander automatically path-resolves multiple string arguments.
But this comes at a cost:
you have to invent a new API for all methods that involve two paths (the .to() chain)
you can't support shortcuts like utf8 for {encoding: 'utf8'}
IMO these are big caveats. They stop sander from feeling like a drop-in replacement for fs. And I still trip up on them a lot and find myself scanning the readme again, even though I've been using sander for a long time.
Why not just provide this functionality via arrays? ie...
sander.writeFile([someDir,'foo.txt'],content);
That is, any path arguments would have to be provided as either a single string or an array of strings. But always a single argument. (Obviously this would entail a major version bump.)
The text was updated successfully, but these errors were encountered:
Hi Rich
I really like the way sander automatically path-resolves multiple string arguments.
But this comes at a cost:
.to()
chain)utf8
for{encoding: 'utf8'}
IMO these are big caveats. They stop sander from feeling like a drop-in replacement for fs. And I still trip up on them a lot and find myself scanning the readme again, even though I've been using sander for a long time.
Why not just provide this functionality via arrays? ie...
That is, any path arguments would have to be provided as either a single string or an array of strings. But always a single argument. (Obviously this would entail a major version bump.)
The text was updated successfully, but these errors were encountered: