mafintosh / changes-feed

Basic changes-feed implementation that runs on top of leveldb
MIT License
28 stars 3 forks source link

Allow user to choose valueEncoding #9

Closed vespakoen closed 8 years ago

vespakoen commented 8 years ago

I tried to use the changes-feed in the browser, unfortunately the buffer doesn't work correctly there: TypeError: value.toArrayBuffer is not a function

I also would like my values to be json, and I don't see a reason why it should explicitly be a buffer?

This is a breaking change, so it this were to be accepted, I guess you should bump the major version.

Thanks!

vespakoen commented 8 years ago

Ouch... I created a new branch based on my master branch that contains my other pull request, if you want me to seperate it into a new pull request, let me know.

mafintosh commented 8 years ago

The error you are encountering is probably because your browserify i out of date. try upgrading to the latest one. I've seen it before.

mafintosh commented 8 years ago

Could we instead support a valueEncoding option in the constructor?

mafintosh commented 8 years ago

i see you already did that in #3 - commented there :)

vespakoen commented 8 years ago

Alright! thanks for the heads up, didn't see #3 (not from me)

3 seems to solve it better so I am closing this one.

Thanks!