federomero/negotiator — pull request #13 by jdeerhake (2014-01-24 21:07:59+00:00)
Title: mediaTypePriority not sorting correctly

I noticed a bug (as shown in the test case) and have tracked it down to a sorting function. It seems it expected filter to modify the array elements, when all it does it remove falsy cases. I added a map to do this and it seems to work correctly for me now.