Skip to content

Commit

Permalink
cleaner regex
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Oct 29, 2024
1 parent af79d34 commit d6e3c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/node/polyfills/01_require.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ Module.globalPaths = modulePaths;

const CHAR_FORWARD_SLASH = 47;
const TRAILING_SLASH_REGEX = /(?:^|\/)\.?\.$/;
const ERROR_CODE_REGEX = /^\[([0-9a-zA-Z_]+)\]/;
const ERROR_CODE_REGEX = /^\[(\w+)\]/;

// This only applies to requests of a specific form:
// 1. name/.*
Expand Down

0 comments on commit d6e3c65

Please sign in to comment.