Code Doesn't match documentation
Code Doesn't match documentation

Hey guys, 

I used the flag syntax from the doc to prevent parent process from exiting on segfault, but it doesn't work, looks like it just wants an object. 

Error:

Jan 23 00:14:05 vagrant-ubuntu-trusty-64 ts-cs[8373]: [/var/www/src/thoughtstream-collaboration_service/node_modules/phantom/phantom.js:181] phantom stderr: Can't open 'flags'

Code:

create: ->
  args = []
  options = {}
  for arg in arguments
    switch typeof arg
      when 'function' then cb = arg
      when 'string' then args.push arg
      when 'object' then options = arg
  if typeof options.parameters is 'object'
    for key, value of options.parameters
      args.push '--'+key+'='+value
  options.path ?= ''
  options.binary ?= options.path+'phantomjs'
  options.port ?= 0
  options.hostname ?= ‘localhost’
amir20/phantomjs-node