Skip to content

Commit

Permalink
src: use starts_with in node_dotenv.cc
Browse files Browse the repository at this point in the history
PR-URL: #53539
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
anonrig authored and aduh95 committed Jul 16, 2024
1 parent f82e20f commit e43a4e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_dotenv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ void Dotenv::ParseContent(const std::string_view input) {
}

// Remove export prefix from key
auto have_export = key.compare(0, 7, "export ") == 0;
if (have_export) {
if (key.starts_with("export ")) {
key.remove_prefix(7);
}

Expand Down

0 comments on commit e43a4e0

Please sign in to comment.