| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const { | |
| 4 | 4 | ArrayFrom, | |
| 5 | + ArrayPrototypeForEach, | ||
| 5 | 6 | ArrayPrototypeJoin, | |
| 6 | 7 | ArrayPrototypePop, | |
| 7 | 8 | ArrayPrototypePush, | |
@@ -61,10 +62,10 @@ const visitorsWithoutAncestors = { | |||
| 61 | 62 | state.replace(node.start, node.start + node.kind.length, 'void ('); | |
| 62 | 63 | } | |
| 63 | 64 | ||
| 64 | - for (const decl of node.declarations) { | ||
| 65 | + ArrayPrototypeForEach(node.declarations, (decl) => { | ||
| 65 | 66 | state.prepend(decl, '('); | |
| 66 | 67 | state.append(decl, decl.init ? ')' : '=undefined)'); | |
| 67 | - } | ||
| 68 | + }); | ||
| 68 | 69 | ||
| 69 | 70 | if (node.declarations.length !== 1) { | |
| 70 | 71 | state.append(node.declarations[node.declarations.length - 1], ')'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,6 +103,10 @@ function isRecoverableError(e, code) { | |||
| 103 | 103 | staticClassFeatures, | |
| 104 | 104 | (Parser) => { | |
| 105 | 105 | return class extends Parser { | |
| 106 | + // eslint-disable-next-line no-useless-constructor | ||
| 107 | + constructor(options, input, startPos) { | ||
| 108 | + super(options, input, startPos); | ||
| 109 | + } | ||
| 106 | 110 | nextToken() { | |
| 107 | 111 | super.nextToken(); | |
| 108 | 112 | if (this.type === tt.eof) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ const { | |||
| 62 | 62 | Boolean, | |
| 63 | 63 | Error, | |
| 64 | 64 | FunctionPrototypeBind, | |
| 65 | - MathMax, | ||
| 65 | + MathMaxApply, | ||
| 66 | 66 | NumberIsNaN, | |
| 67 | 67 | NumberParseFloat, | |
| 68 | 68 | ObjectAssign, | |
@@ -1647,8 +1647,8 @@ function defineDefaultCommands(repl) { | |||
| 1647 | 1647 | help: 'Print this help message', | |
| 1648 | 1648 | action: function() { | |
| 1649 | 1649 | const names = ArrayPrototypeSort(ObjectKeys(this.commands)); | |
| 1650 | - const longestNameLength = MathMax( | ||
| 1651 | - ...ArrayPrototypeMap(names, (name) => name.length) | ||
| 1650 | + const longestNameLength = MathMaxApply( | ||
| 1651 | + ArrayPrototypeMap(names, (name) => name.length) | ||
| 1652 | 1652 | ); | |
| 1653 | 1653 | ArrayPrototypeForEach(names, (name) => { | |
| 1654 | 1654 | const cmd = this.commands[name]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments