jkutner/ueberDB — pull request #1 by emirotin (2011-11-01 17:18:28+00:00)
Title: Linted and fixed(?)

I did various style-related and conventional fixes to the code. Mostly inspired and hinted by JSHint

I also believe I fixed a couple of buggish or non-intuitive lines:

- for (var v in array) will iterate over length and other prototypal properties as well, so it should be accompanied by array.hasOwnProperty(v)

- expressions like

!array.length < 1

look hackish (though they work) - the negation is 1st applied to the length transforming 0 into true, and 1 into false, then this boolean value is compared to 1

The much clearer form would be

if (a.length) or even if(a)

- I also replaced new Array() with literal [] which is the recommended form