Title: path.parse need · Issue #6976 · nodejs/node-v0.x-archive · GitHub
Open Graph Title: path.parse need · Issue #6976 · nodejs/node-v0.x-archive
X Title: path.parse need · Issue #6976 · nodejs/node-v0.x-archive
Description: When working with filenames its often need to split path to separate components simultaneously: var dir = path.dirname(f); var base = path.basename(f); var ext= path.extname(f); Internally all this functions uses universal parser splitPa...
Open Graph Description: When working with filenames its often need to split path to separate components simultaneously: var dir = path.dirname(f); var base = path.basename(f); var ext= path.extname(f); Internally all this...
X Description: When working with filenames its often need to split path to separate components simultaneously: var dir = path.dirname(f); var base = path.basename(f); var ext= path.extname(f); Internally all this...
Opengraph URL: https://github.com/nodejs/node-v0.x-archive/issues/6976
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"path.parse need","articleBody":"When working with filenames its often need to split path to separate components simultaneously:\n\n```\nvar dir = path.dirname(f);\nvar base = path.basename(f);\nvar ext= path.extname(f);\n```\n\nInternally all this functions uses universal parser splitPath that each time return all components of path. Moreover this parser returns the `drive` piece of path on Windows, but there is not any public API to achieve it.\n\nIt is possible to introduce new function in `path` module `path.parse(f)`?\n`path.parse` must return object with next properties:\n- `root` - drive or UNC prefix (Windows specific)\n- `dir` directory name of a path (=== `path.dirname()` )\n- `base` last portion of a path (=== `path.basename()` )\n- `ext` extension (=== `path.extname()` )\n- `name` basename without extension and dot\n\nAlso, for completness, need the function `path.format(pathObj)` which takes a parsed path object and return a formatted path string. \n","author":{"url":"https://github.com/litmit","@type":"Person","name":"litmit"},"datePublished":"2014-01-26T18:58:02Z","url":"https://github.com/nodejs/node-v0.x-archive/issues/6976"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7aed8c8e-1601-3660-c454-4329dc243e1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AD9C:55AC6:1735634:1E71F38:6AED819D |
| html-safe-nonce | 0b70ee820b88a8e1bf5bbef81ca5a219dee58bc2efe12b1649a61afa46668361 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDlDOjU1QUM2OjE3MzU2MzQ6MUU3MUYzODo2QUVEODE5RCIsInZpc2l0b3JfaWQiOiI2ODM3MjQwNjExNjEwNjU3MTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b912482621a67f76b44a56b695d93e52b95696f7598abeec5c1e560bc2446499 |
| hovercard-subject-tag | issue:26319838 |
| 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-v0.x-archive/6976/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7a1f09117117709eba08c810caedc63ab293c65990a78a5aba698670693fac0/nodejs/node-v0.x-archive/issues/6976 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7a1f09117117709eba08c810caedc63ab293c65990a78a5aba698670693fac0/nodejs/node-v0.x-archive/issues/6976 |
| og:image:alt | When working with filenames its often need to split path to separate components simultaneously: var dir = path.dirname(f); var base = path.basename(f); var ext= path.extname(f); Internally all this... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | litmit |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node-v0.x-archive git https://github.com/nodejs/node-v0.x-archive.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 211666 |
| octolytics-dimension-repository_nwo | nodejs/node-v0.x-archive |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 211666 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node-v0.x-archive |
| 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 | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width