Skip to content
Myr

refactor: simplify `normalizeTypes` function (#6097)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ayoub Mabrouk · committed by GitHub · parent 7f13d57 · Browse files · 1 file+3 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−8 removed

  • other:+3 added−8 removed

1 file+3 added−8 removed

modified:lib/utils.js+3 added-8 removed
68 unmodified lines
69 * @return {Array}70 * @api private71 */7273exports.normalizeTypes = function(types){74 var ret = [];7576 for (var i = 0; i < types.length; ++i) {77 ret.push(exports.normalizeType(types[i]));78 }7980 return ret;73exports.normalizeTypes = function(types) {74 return types.map(exports.normalizeType);75};767778/**79 * Parse accept params `str` returning an80 * object with `.value`, `.quality` and `.params`.81 *
188 unmodified lines