Extend res.links() to allow adding multiple links with the same rel #2729 by andvea · Pull Request #4885 · expressjs/express

method overloading via type checking. sure. might want to clean up / optimize how we are building strings here as well

There are two parts you could be referring to, so just to clarify, I want the value to be either a string or an object with an href key. I do not want to pull over the top level shape change (Object|Array). The more I think about it the more I am worried any change like this could be breaking though. For example, in the current api if you passed an Object with a toString you would get expected behavior but if we checked typeof links[rel] !== 'string' and used .href we would break folks.

Is this being too paranoid?