Skip to content

Commit

Permalink
Optimize: Remove unnecessary capture group.
Browse files Browse the repository at this point in the history
  • Loading branch information
exoego committed Nov 4, 2018
1 parent b1c2a77 commit f8a15fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pathStateMachine[IN_DOUBLE_QUOTE] = {
* Check if an expression is a literal value.
*/

const literalValueRE: RegExp = /^\s?(true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/
const literalValueRE: RegExp = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/
function isLiteral (exp: string): boolean {
return literalValueRE.test(exp)
}
Expand Down

0 comments on commit f8a15fe

Please sign in to comment.