What is the expected behavior if there are duplicate content-types inside the Accept header.
var n = Negotiator({ headers: { accept: "application/json, application/xml, application/json" } });
n.mediaTypes();
// [ 'application/json', 'application/xml', 'application/json' ]
n.mediaTypes(['application/json', 'application/xml']);
// ['application/xml', 'application/json']
n.mediaTypes(['application/*']);
// []
n.mediaTypes(['*/*']);
// []
Does the preference of application/json decreases due to duplication? And the availableMediaTypes given to the mediaTypes() should be concrete concrete types?
What is the expected behavior if there are duplicate content-types inside the Accept header.
Does the preference of
application/jsondecreases due to duplication? And theavailableMediaTypesgiven to themediaTypes()should be concrete concrete types?