copied from from darcs http://common-lisp.net/project/suave/darcs/ dir:experimental/js-on-cl