firebase/flashlight — pull request #7 by nessup (2014-05-03 21:28:30+00:00)
Title: Implementing the `fields` config option using underscore's pick() and size()

Special care is taken to ensure no crash occurs if the path referenced is a non-object. If you don't feel awesome about bringing underscore in as a dependency, I can shoot you another version of this commit with underscore's pick() and size() implementations copy-pasted and the relevant license file.

Also, as you know, Firebase doesn't quite allow for picking of fields within a path. So, I also updated config.js to reflect that fact. Note that, with this implementation, if a non-index field is changed in a given object, the object will not be re-indexed (which probably is a safe performance optimization).