Skip to content

Commit

Permalink
little opti for slice
Browse files Browse the repository at this point in the history
  • Loading branch information
errorrik committed Jan 9, 2025
1 parent 1119fdb commit 726d4a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function parseName(source) {
}
else if (/^(['"])([^\1]+)\1$/.test(propAccessorLiteral)) {
// for string literal
result.push(propAccessorLiteral.slice(1, propAccessorLiteral.length - 1));
result.push(propAccessorLiteral.slice(1, -1));
}

term = term.slice(propAccessorEnd + 1);
Expand Down

0 comments on commit 726d4a4

Please sign in to comment.