cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
97 stars 14 forks source link

basic naive search #44

Closed timgoeller closed 4 years ago

timgoeller commented 4 years ago

Very basic search that iterates messages that fit the opts (the opts that go into getMessages()) and returns a promise that will resolve to a list of matches. These matches are objects with a message property and a list of indexes where the search string was found. Messages that don't contain the search string won't be returned.

timgoeller commented 4 years ago

Didn't know about standard before, thanks for the hint!

cblgh commented 4 years ago

@timgoeller looks great to me! thank you so much! this closes #5 and helps unblock https://github.com/cabal-club/cabal-desktop/issues/143

can you generate the docs as well? just execute: npm run doc the docstrings you added will update https://github.com/cabal-club/cabal-client/blob/master/api.md