rvagg/node-levelup — pull request #115 by rvagg (2013-04-11 10:16:47+00:00)
Title: 0.8 WIP

I realised that arguments aren't properly checked in LevelUP even though LevelDOWN does a good job with them and the problem with that is that they don't bubble up properly to the callee if there isn't a callback--they should `throw` unless there is an `'error'` listener.

Introducing these checks isn't a patch-level change so say hello to 0.8. Thankfully V8 is able to mostly optimise these away, benchmarks don't show much difference at all.

Also fixed up a bug that someone, I think @juliangruber, picked up that was supposed to be fixed in 0.7. An error from LevelDOWN's `get()` is always interpreted by LevelUP as a `NotFoundError`, which is clearly wrong. LevelDB consistently gives `'NotFound'` as part of the error string so we just test for that.

Have also done some test cleanup, including splitting up some of the larger test files.

I'm not sure I have enough time to do anything else and I kind of need these fixes for something I'm working on, so unless anyone wants to contribute anything else, I may merge and release in a day or two.