{"id":17353217,"url":"https://github.com/zacanger/path-normalize","last_synced_at":"2025-08-21T10:31:15.124Z","repository":{"id":57320685,"uuid":"122814990","full_name":"zacanger/path-normalize","owner":"zacanger","description":"Zero-dependency browser-oriented path.normalize","archived":false,"fork":false,"pushed_at":"2024-06-19T17:19:40.000Z","size":1758,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T13:05:40.582Z","etag":null,"topics":["normalize","path","path-normalize"],"latest_commit_sha":null,"homepage":"http://npm.im/path-normalize","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zacanger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-25T07:32:12.000Z","updated_at":"2025-08-08T09:22:33.000Z","dependencies_parsed_at":"2024-06-18T21:30:27.053Z","dependency_job_id":"699c94d0-6d94-4ab6-a414-222879ede0a1","html_url":"https://github.com/zacanger/path-normalize","commit_stats":{"total_commits":176,"total_committers":2,"mean_commits":88.0,"dds":0.02840909090909094,"last_synced_commit":"be3fa2d6f57b1fc3251d51c34a2d395917addc3a"},"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"purl":"pkg:github/zacanger/path-normalize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fpath-normalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fpath-normalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fpath-normalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fpath-normalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacanger","download_url":"https://codeload.github.com/zacanger/path-normalize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacanger%2Fpath-normalize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271462773,"owners_count":24764035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["normalize","path","path-normalize"],"created_at":"2024-10-15T17:16:00.272Z","updated_at":"2025-08-21T10:31:14.813Z","avatar_url":"https://github.com/zacanger.png","language":"JavaScript","readme":"# path-normalize\n\nZero-dependency browser-oriented `path.normalize`.\n\n[Donate](https://ko-fi.com/zacanger)\n\n[![npm version](https://img.shields.io/npm/v/path-normalize.svg)](https://npm.im/path-normalize) [![CircleCI](https://circleci.com/gh/zacanger/path-normalize/tree/master.svg?style=svg)](https://circleci.com/gh/zacanger/path-normalize/tree/master) [![codecov](https://codecov.io/gh/zacanger/path-normalize/branch/master/graph/badge.svg)](https://codecov.io/gh/zacanger/path-normalize)\n\n`path-normalize` is different from\n[normalize-path](http://npm.im/normalize-path); `normalize-path` only handles\nslashes, while this lib is a browser-focused version of the POSIX\n`path.normalize` in Node.\n\n`path-normalize` also differs from Node's `path.normalize`. `path-normalize`\nhandles uri-encoded strings.\n\nMost of this library is directly from\n[Node's source](https://github.com/nodejs/node/blob/b404aa56c0e776c9722017ca020f9d04c7aa6de2/lib/path.js#L1182).\n--------\n\n## Installation\n\n`npm i path-normalize`\n\n## Usage\n\n```javascript\nconst normalize = require('path-normalize')\nconst normal = (somePath) =\u003e normalize(somePath)\n```\n\nSlightly more real-world example:\n\n```javascript\nimport normalize from 'path-normalize'\n\n// imaginary client-side router api\nrouter.route('/foo/*', (pathname) =\u003e {\n  const normalized = normalize(pathname)\n  if (normalized !== pathname) {\n    router.redirect(normalized)\n  } else {\n    renderFoo()\n  }\n})\n```\n\n[LICENSE](./LICENSE.md)\n","funding_links":["https://ko-fi.com/zacanger"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacanger%2Fpath-normalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacanger%2Fpath-normalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacanger%2Fpath-normalize/lists"}