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
The current API design supports just a single way of deleting a file
files: {"file/to/delete.txt"" null}
However, it would be useful to trigger a file deletion based on specific conditions, such as the example below:
files: {"file/to/delete.txt": ({ exists, encoding, content })=>{// do not create the file if it does not existif(!exists)returnnull;constfileContent=Buffer.from(content,encoding).toString("utf-8")if(fileContent.includes('abc')){// trigger file deletionreturn???
}// do not alter file contentreturnnull;}}
Since both null and undefined already have different functionalities, it is unclear what return value could be used to instruct the library to initiate a file deletion. What are your thoughts?
The text was updated successfully, but these errors were encountered:
Since both null and undefined already have different functionalities, it is unclear what return value could be used to instruct the library to initiate a file deletion. What are your thoughts?
I think the correct way to do this is to use Symbols. See how mapObjectSkip is implemented in map-obj. I don't mind releasing a breaking change for this.
The current API design supports just a single way of deleting a file
However, it would be useful to trigger a file deletion based on specific conditions, such as the example below:
Since both
null
andundefined
already have different functionalities, it is unclear what return value could be used to instruct the library to initiate a file deletion. What are your thoughts?The text was updated successfully, but these errors were encountered: