Espen Klem

Results 75 comments of Espen Klem

Would be cool if we could just expose the full API. Even if the input will be a little technical it will make the learning process a lot easier. I'll...

I'm guessing we can just do an input to a function, and we don't need any `.then`-chaining, other than a `console.log(result)` from each function. Will try with [minimist for parsing...

Also, browser console works quite well, even if a bit different in Firefox and Chrome.

Firefox is working good, Chrome, just partly (.then() won't work). Good learning tool, I'll blog about it.

So, if I did this, would JSON stringified result be a good output? And parse input when search-index is piped to? Then you could do ```console si --AND | si...

@fergiemcdowall, should I make it a separate module? Then search-index is kept with few dependencies. Or is it important enough to keep it in?

Here's how to [get data in through a pipe to search-index](https://shapeshed.com/command-line-utilities-with-nodejs/#piping-data).

Yes, that's a good idea. I was more thinking in the map reduce way: ``` some query | another query on returned ID's | yet another | DOCUMENTS ``` But...

If we, for now, look at the JS-code way, I think something like `.then(result)` or .then(resultPrint)`should actually work, result/resultPrint being a function that do JSON.stringify and then console.log.

I'll have a go at this again when the [jsonAPI](https://github.com/fergiemcdowall/search-index/issues/475) gets stable enough =)