Use default parameters where possible and other microrefactoring (#10135)

This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2021-01-27 12:36:39 +08:00
1 parent a98292e417
commit 1df287acc8
10 files changed
+35 -51

No files matched your search

+1 -3
View File
@@ -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 {