capnproto / node-capnp

Cap'n Proto bindings for Node.js
BSD 2-Clause "Simplified" License
258 stars 35 forks source link

Implement Sandstorm powerbox query matching algorithm as a library function. #32

Closed kentonv closed 7 years ago

kentonv commented 7 years ago

Algorithm documented here: https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/powerbox.capnp#L115

Although this is Sandstorm-specific, I'm putting it into node-capnp for convenience: this needs to be implemented in C++, and it would be surprisingly difficult to create a second Node module that shares the Cap'n Proto library with capnp.node.

@dwrensha please review.

kentonv commented 7 years ago

Addressed comments.

Note that strings are technically lists and so testing string matching in fact covers list matching.

dwrensha commented 7 years ago

Looks good to me.