Title: `path.escapeGlob` · Issue #61258 · nodejs/node · GitHub
Open Graph Title: `path.escapeGlob` · Issue #61258 · nodejs/node
X Title: `path.escapeGlob` · Issue #61258 · nodejs/node
Description: What is the problem this feature will solve? Would allow for the dynamic creation of glob patterns from arbitrary paths. Example: const pattern = `${path.escapeGlob(import.meta.dirname)}/*`; What is the feature you are proposing to solve...
Open Graph Description: What is the problem this feature will solve? Would allow for the dynamic creation of glob patterns from arbitrary paths. Example: const pattern = `${path.escapeGlob(import.meta.dirname)}/*`; What i...
X Description: What is the problem this feature will solve? Would allow for the dynamic creation of glob patterns from arbitrary paths. Example: const pattern = `${path.escapeGlob(import.meta.dirname)}/*`; What i...
Opengraph URL: https://github.com/nodejs/node/issues/61258
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`path.escapeGlob`","articleBody":"### What is the problem this feature will solve?\n\nWould allow for the dynamic creation of glob patterns from arbitrary paths.\n\nExample:\n\n```js\nconst pattern = `${path.escapeGlob(import.meta.dirname)}/*`;\n```\n\n### What is the feature you are proposing to solve the problem?\n\nSomething similar in functionality to this:\n\n```js\n// Wraps symbols which open groups `{`, `[`, `(`, and\n// those with semantics independent of groups `*`, `?`\npath.escapeGlob = (x = \"\") =\u003e x.replace(/([*{[(?])/g, \"[$1]\");\n```\n\nAnd this:\n\n```js\n// inverse path.escapeGlob\npath.unescapeGlob = (x = \"\") =\u003e x.replace(/\\[(.)\\]/g, \"$1\");\n```\n\nI was using #58988 as a reference for special chars.\n\n### What alternatives have you considered?\n\nUsing a user land package everywhere dynamic glob creation is required, or even for everything glob related to keep things consistent.","author":{"url":"https://github.com/valler","@type":"Person","name":"valler"},"datePublished":"2026-01-03T02:39:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/61258/node/issues/61258"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:edbecaea-5548-00f2-9b04-da1b80fe0a68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE74:1EFEA2:1D4E6A7:2A2F095:6A4CEA61 |
| html-safe-nonce | fc436c6a49bf6aad9b2d21dce75d4da7cdbd679d60ac9f395f3dc6702618b241 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTc0OjFFRkVBMjoxRDRFNkE3OjJBMkYwOTU6NkE0Q0VBNjEiLCJ2aXNpdG9yX2lkIjoiMjE5NzkyNjY4MjMzNjI0MTYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 24fa6fd8c01e4efaf090d65cc137552429807a9c0fbefdfe20ef336b42dc4edd |
| hovercard-subject-tag | issue:3777597062 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/61258/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b30773842ec731eb885fc3591a9487dbb325586b34805d04d39acb537498b41e/nodejs/node/issues/61258 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b30773842ec731eb885fc3591a9487dbb325586b34805d04d39acb537498b41e/nodejs/node/issues/61258 |
| og:image:alt | What is the problem this feature will solve? Would allow for the dynamic creation of glob patterns from arbitrary paths. Example: const pattern = `${path.escapeGlob(import.meta.dirname)}/*`; What i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | valler |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width