Hi
I’m just starting with the JS wrapper for IPFS.
The first action I want to do is to write a string to a file.
The simples code snippet I could figure out doing this (initialization left out) is this:
for await (const file of ipfs.add('hello world')) {
console.log(file);
}
While it’s nice to be able to write multiple files at once, I find it odd and counter-intuitive that I have to use a loop even for the default case (I’d argue) of writing a single file. Or is there a way to do this which I’m missing?