multistream-select
multistream-select copied to clipboard
Update Docs + API - matchingFunc
Update Docs + API after the matchingFunc discussion. We discussed:
- multistream takes in a tuple:
(multicodec-header, handlerFunc, matchingFunc) -
handlerFuncis called with the header -
matchingFuncdecides whether a header matches. - default
matchingFuncis equivalence (tests the given header matches the original one)
// something like this
type matchingFunc func(h multicodecHeader) bool
type handlerFunc func(h multicodecHeader, s io.Stream)