JS docopt implementation