neekey/ps — pull request #3 by matthewforr (2014-10-18 15:53:08+00:00)
Title: Add PPID filtering

SpaceJam uses this library to find child processes running from a particular parent process. They do this with the command `ps --pid `. Unfortuanetly, OS X `ps` does not offer a `--pid` argument which meant the entire package would fail.

I looked hard to find a way to feed these arguments in but it was just not possible. That being said, adding the filtering based on PPID right to this library works great. As this PR stands, PPID is now always included in the resultsList and acts as `undefined` if it wasn't part of the `ps` command query.

I reckon that it might make sense to make it conditional so it doesn't pollute the results space. If blank it does show up as `undefined` so probably no harm, no foul there.

One last thing, I checked on OS X and Ubuntu and both report back as `PPID` so the matching in the `formatOutput` function should be good. I do not know how Windows behaves so that should be checked.

Let me know if you have any questions of comments.