This would be easier to read if it didn't use named arguments, e.g.

    function proj4() {
        var fromProj, toProj, coord;
        if (arguments.length === 3) {
          arguments[0] = fromProj;
          // ...
        }
    }