René's URL Explorer Experiment


Title: Improve Path.parse / Path.format combo · Issue #1999 · nodejs/node · GitHub

Open Graph Title: Improve Path.parse / Path.format combo · Issue #1999 · nodejs/node

X Title: Improve Path.parse / Path.format combo · Issue #1999 · nodejs/node

Description: We have Path.format / Path.parse functions. They can be chained which is very convenient. import Path from "path"; let path = "/foo/bar/bazz.js"; let pathP = Path.format(Path.parse(path)); Currently parse converts string to an object wit...

Open Graph Description: We have Path.format / Path.parse functions. They can be chained which is very convenient. import Path from "path"; let path = "/foo/bar/bazz.js"; let pathP = Path.format(Path.parse(path)); Currentl...

X Description: We have Path.format / Path.parse functions. They can be chained which is very convenient. import Path from "path"; let path = "/foo/bar/bazz.js"; let pathP = Path.format(Path.pa...

Opengraph URL: https://github.com/nodejs/node/issues/1999

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve Path.parse / Path.format combo","articleBody":"We have `Path.format` / `Path.parse` functions.\nThey can be chained which is very convenient.\n\n``` js\nimport Path from \"path\";\n\nlet path = \"/foo/bar/bazz.js\";\nlet pathP = Path.format(Path.parse(path));\n```\n\nCurrently `parse` converts string to an object with such structure\n\n``` js\n{ root: '/',\n  dir: '/Users/ivankleshnin/Projects/demo',\n  base: 'config.yml',\n  ext: '.yml',\n  name: 'config' }\n```\n\nThis object contains denormalized data between `base`, `name` and `ext` key values.\nNow let's try to replace file extension.\n\n``` js\nimport Path from \"path\";\nimport {assoc} from \"ramda\"\n\nlet path = \"/Users/ivankleshnin/Projects/demo/config.js\";\nlet pathP = assoc(\"ext\", \".json\", Path.parse(path));\n/* {...\n  base: 'config.js',  -- these two are \n  ext: '.json',       -- unsynced!\n...} */\nconsole.log(Path.format(pathP)); // extension weren't changed :(\n```\n\nThe simplest task is going to be not so simple?!\nNow if `format` took into consideration `ext` and `name` rather than `base` this could lead to an equal problem with changes to `base` key being ignored. \n\nCan we get rid of this `base` key?  It's always `parsed.name + parsed.ext` formula, not a big deal to make it manually. Example of hidden file parse: `{ base: '.gitignore', ext: '', name: '.gitignore' }` - same rule apply.\n\nWe can probably also implement it in a backward-compatibile way,\nkeeping `base` but using JS getter / setter for it's evaluation.\n","author":{"url":"https://github.com/ivan-kleshnin","@type":"Person","name":"ivan-kleshnin"},"datePublished":"2015-06-17T08:54:39Z","url":"https://github.com/nodejs/node/issues/1999"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:528668e7-ecfb-3a9b-f913-698beb623d28
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE5A4:328E29:7EEF6B:A4BF4B:6AED3448
html-safe-noncec40ec36d0df15c75ee28723af0a6a161f5ef8373d39fb825d40496d0295183f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUE0OjMyOEUyOTo3RUVGNkI6QTRCRjRCOjZBRUQzNDQ4IiwidmlzaXRvcl9pZCI6IjIxNjIwNDg3MTcxMTgzMjE3MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac971f35fb306d1a322457379a59497d6640bab2bb6a3873e27523fad312435ed1
hovercard-subject-tagissue:88959802
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/1999/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f90ff723a05f873c25a8e94e17c3e91bfad3ffa977b6398ae1fe2027828743cf/nodejs/node/issues/1999
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f90ff723a05f873c25a8e94e17c3e91bfad3ffa977b6398ae1fe2027828743cf/nodejs/node/issues/1999
og:image:altWe have Path.format / Path.parse functions. They can be chained which is very convenient. import Path from "path"; let path = "/foo/bar/bazz.js"; let pathP = Path.format(Path.parse(path)); Currentl...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameivan-kleshnin
hostnamegithub.com
expected-hostnamegithub.com
Nonee51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ebb7b901cc154ecc179a44f266fcf69f343b30
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/1999#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F1999
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F1999
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/1999
Reloadhttps://github.com/nodejs/node/issues/1999
Reloadhttps://github.com/nodejs/node/issues/1999
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/1999
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/1999
Improve Path.parse / Path.format combohttps://github.com/nodejs/node/issues/1999#top
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
pathIssues and PRs related to the path subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22path%22
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
test-actionhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test-action%22
https://github.com/ivan-kleshnin
ivan-kleshninhttps://github.com/ivan-kleshnin
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#issue-88959802
Nexthttps://github.com/nodejs/node/issues/1999?timeline_page=1
https://github.com/benjamingr
benjamingrhttps://github.com/benjamingr
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#issuecomment-112749447
https://github.com/ivan-kleshnin
ivan-kleshninhttps://github.com/ivan-kleshnin
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#issuecomment-112760989
Self-contained working gisthttps://gist.github.com/ivan-kleshnin/edb33afd4ce5c3991d8f
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#Configurable_attributehttps://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#Configurable_attribute
mscdexhttps://github.com/mscdex
pathIssues and PRs related to the path subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22path%22
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#event-333294073
Fishrock123https://github.com/Fishrock123
discussIssues opened for discussion and feedback.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22discuss%22
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#event-333343079
brendanashworthhttps://github.com/brendanashworth
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
on Jun 17, 2015https://github.com/nodejs/node/issues/1999#event-333409181
https://github.com/nwoltman
nwoltmanhttps://github.com/nwoltman
on Feb 9, 2016https://github.com/nodejs/node/issues/1999#issuecomment-181716306
npmhttps://www.npmjs.com/
the original issuehttps://github.com/nodejs/node-v0.x-archive/issues/6976
https://github.com/benjamingr
benjamingrhttps://github.com/benjamingr
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#issuecomment-294437391
https://github.com/sam-github
sam-githubhttps://github.com/sam-github
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#issuecomment-294501166
https://www.youtube.com/watch?v=jJaIwea8r2Ahttps://www.youtube.com/watch?v=jJaIwea8r2A
@nwoltmanhttps://github.com/nwoltman
refackhttps://github.com/refack
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#event-1045288841
https://github.com/refack
refackhttps://github.com/refack
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#issuecomment-294539656
https://github.com/nwoltman
nwoltmanhttps://github.com/nwoltman
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#issuecomment-294550346
@sam-githubhttps://github.com/sam-github
documentedhttps://nodejs.org/dist/latest-v7.x/docs/api/path.html#path_path_format_pathobject
@nwoltmanhttps://github.com/nwoltman
qshttps://www.npmjs.com/package/qs
https://github.com/refack
refackhttps://github.com/refack
on Apr 17, 2017https://github.com/nodejs/node/issues/1999#issuecomment-294552629
https://github.com/Trott
Trotthttps://github.com/Trott
on Aug 15, 2017https://github.com/nodejs/node/issues/1999#issuecomment-322616747
https://github.com/TimothyGu
TimothyGuhttps://github.com/TimothyGu
on Aug 16, 2017https://github.com/nodejs/node/issues/1999#issuecomment-322621399
#12818https://github.com/nodejs/node/pull/12818
@tniessenhttps://github.com/tniessen
@refackhttps://github.com/refack
https://github.com/refack
refackhttps://github.com/refack
on Aug 16, 2017https://github.com/nodejs/node/issues/1999#issuecomment-322655540
#12511https://github.com/nodejs/node/pull/12511
https://github.com/refack
refackhttps://github.com/refack
on Aug 16, 2017https://github.com/nodejs/node/issues/1999#issuecomment-322656698
https://user-images.githubusercontent.com/96947/29345956-3b27c408-8210-11e7-8c7c-e01bafedbbc7.png
Trotthttps://github.com/Trott
discussIssues opened for discussion and feedback.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22discuss%22
on Mar 11, 2018https://github.com/nodejs/node/issues/1999#event-1514876990
refackhttps://github.com/refack
on May 23, 2019https://github.com/nodejs/node/issues/1999#event-2363463799
mhdawsonhttps://github.com/mhdawson
test-actionhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test-action%22
on Feb 17, 2022https://github.com/nodejs/node/issues/1999#event-6093820905
targoshttps://github.com/targos
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Apr 4, 2022https://github.com/nodejs/node/issues/1999#event-15224298485
targoshttps://github.com/targos
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Apr 4, 2022https://github.com/nodejs/node/issues/1999
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Aug 17, 2022https://github.com/nodejs/node/issues/1999#issuecomment-1217357265
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Aug 17, 2022https://github.com/nodejs/node/issues/1999#event-7201588594
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 17, 2022https://github.com/nodejs/node/issues/1999#issuecomment-1249970636
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 17, 2022https://github.com/nodejs/node/issues/1999#event-7407005626
targoshttps://github.com/targos
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Apr 4, 2023https://github.com/nodejs/node/issues/1999
avivkellerhttps://github.com/avivkeller
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Jun 26, 2024https://github.com/nodejs/node/issues/1999
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/1999
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/1999
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
pathIssues and PRs related to the path subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22path%22
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
test-actionhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test-action%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.