| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1× 1× 28× 44× 1× | const parseMediaValue = require("./parseMediaValue");
/**
* Parses a string containing multiple media values and returns an array
* of objects containing data about each value. Such strings are used as
* the values of the Accept* family of HTTP headers.
*/
function parseMediaValues(value, typeSeparator) {
return value.split(/\s*,\s*/).map(function (mediaValue) {
return parseMediaValue(mediaValue, typeSeparator);
});
}
module.exports = parseMediaValues;
|