js: Support invalid javascript

When attempting to parse invalid javascript, the prior implementation
would throw.  This patch ignores errors and returns an empty array of
`deps` instead.

Closes #4.