MatthewMueller/cheerio — pull request #415 by jugglinmike (2014-03-12 02:00:53+00:00)
Title: Implement `$.fn.get`

This should resolve issue #414.

The documentation is a bit lackluster because there's no straightforward means to demonstrate this behavior with the supplied fixture. This also represents the first time we're documenting the shape of the Node-like object created by htmlparser2.

I consider this method superior to `Cheerio#toArray` because it is more powerful and it is standard. These traits make `toArray` a good candidate for removal (or at least deprecation). I've re-implemented `toArray` to use `get` internally. If the maintainers agree with this, it's probably also advisable to find-and-replace internal use of `toArray` with `get` to avoid the overhead of the additional function call introduced here.