Skip to content

Conversation

@DomAmato
Copy link

Just syntactical changes for other ES6+ features that were not consistent throughout the code base. There are likely more but it adds:

  • Changes Math.pow to exponentiation operator
  • Uses property shorthand when applicable
  • Changes indexOf to use includes
  • Changes function expressions to arrow expressions

Here is the benchmark output
• test/benchmark.js:

• calculator: parse.

✔  nearley  4,855.09  ops/sec  ±3.97%  (82 runs)

• json: parse sample1k.

✔  nearley  40.15  ops/sec  ±5.99%  (51 runs)

• tosh: parse.

✔  nearley  904.51  ops/sec  ±3.87%  (85 runs)

kale-io added 30 commits March 19, 2019 20:10
ECMAScript 7 introduced the exponentiation operator `**` so that using `Math.pow` is no longer necessary
ECMAScript 7 introduced the includes function for arrays so that bitwise and comparisons to -1 are no longer needed
ECMAScript 7 introduced the includes function for arrays so that bitwise and comparisons to -1 are no longer needed
ECMAScript 7 introduced the includes function for arrays so that bitwise and comparisons to -1 are no longer needed
Shorter syntax for common object property definition idiom.
Shorter syntax for common object property definition idiom.
Shorter syntax for common object property definition idiom.
Shorter syntax for common object property definition idiom.
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
kale-io and others added 8 commits March 19, 2019 20:38
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Converts a function expression to the new arrow function syntax. Performs the necessary safety checks.
Applied over an entire file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants