gko / concat

🐱 concatenate files
MIT License
44 stars 7 forks source link

No option for delimiter #5

Open mgillam opened 6 years ago

mgillam commented 6 years ago

Using this within a node application, I hit a case where I wanted to concatenate multiple files together without inserting a linebreak between them (it's for reassembling a single piece of data spread across files). Currently the newline is hard-coded. I fixed it in my local build by hacking the change into the package, but maybe it would be worthwhile including an option to either omit the \n or take it a step further by allowing the user to supply a delimiter string, much like the join method on an array. Obviously this would be an optional parameter with the default behavior being identical to current behavior. To be clear, I don't mind doing the work and submitting a PR if I've got agreement on the change.

alexchandel commented 6 years ago

The README should mention that concat concatenates with newlines interspersed.