Use default parameters where possible and other microrefactoring (#10135)
This commit is contained in:
1 parent
a98292e417
commit
1df287acc8
10 files changed
+35
-51
No files matched your search
+1
-3
@@ -27,9 +27,7 @@ function getParsers(options) {
|
||||
return parsers;
|
||||
}
|
||||
|
||||
function resolveParser(opts, parsers) {
|
||||
parsers = parsers || getParsers(opts);
|
||||
|
||||
function resolveParser(opts, parsers = getParsers(opts)) {
|
||||
if (typeof opts.parser === "function") {
|
||||
// Custom parser API always works with JavaScript.
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user