MatthewMueller/cheerio — pull request #40 by ironchefpython (2012-02-09 04:01:14+00:00)
Title: changing traversal functions to return empty cheerio objects instead of null.

Here's what I see using jQuery in a Javascript REPL

```javascript
> $("

").parent()
[]

> $("

").parent().length
0

> $("

").parent().constructor
function ( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context, rootjQuery );
}

> $("

").next()
[]

> $("

").prev()
[]

```
etc. It's pretty clear that all of the traversal functions return a zero-length jQuery object instead of null.