I wanted to propose adding an optional placeholder name to the syntax and ask you what do you think about it?
Example:
const fileName = "file.txt";
fileName
|> addServerPath(%) // `/path/to/server/file.txt`
|> convertToUrl(%filePath) // `http://server.com/path/to/file.txt`
|> await fetchFile(%fileUrl) // some node file object
|> await saveFile(%fileHandler, "downloads")
As seen, in the pipe steps we add the name of the placeholder. It is optional and has 0 impact on how this code works, but makes it easier to read, as we can add the information 'what is the placeholder at this step' so the reader of the code doesn't have to guess it from function names.
I wanted to propose adding an optional placeholder name to the syntax and ask you what do you think about it?
Example:
As seen, in the pipe steps we add the name of the placeholder. It is optional and has 0 impact on how this code works, but makes it easier to read, as we can add the information 'what is the placeholder at this step' so the reader of the code doesn't have to guess it from function names.