{"id":19226387,"url":"https://github.com/untool/pathifist","last_synced_at":"2025-10-16T10:56:33.055Z","repository":{"id":38427208,"uuid":"153188919","full_name":"untool/pathifist","owner":"untool","description":"A JavaScript utility library simplifying the handling of URL paths in both server and browser environments.","archived":false,"fork":false,"pushed_at":"2025-09-28T16:48:44.000Z","size":870,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-28T18:27:47.319Z","etag":null,"topics":["library","universal","url","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pathifist","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/untool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-10-15T22:20:21.000Z","updated_at":"2021-10-06T12:14:53.000Z","dependencies_parsed_at":"2024-06-21T02:16:55.210Z","dependency_job_id":"ca1263c8-dda7-429d-b97a-aaca65a981d0","html_url":"https://github.com/untool/pathifist","commit_stats":{"total_commits":152,"total_committers":6,"mean_commits":"25.333333333333332","dds":"0.11184210526315785","last_synced_commit":"cdc6804adcb1fe84625cfd52da17faa3c86a9ae3"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/untool/pathifist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untool%2Fpathifist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untool%2Fpathifist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untool%2Fpathifist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untool%2Fpathifist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/untool","download_url":"https://codeload.github.com/untool/pathifist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/untool%2Fpathifist/sbom","scorecard":{"id":485654,"data":{"date":"2025-08-11","repo":{"name":"github.com/untool/pathifist","commit":"cdc6804adcb1fe84625cfd52da17faa3c86a9ae3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:42:09.996Z","repository_id":38427208,"created_at":"2025-08-19T17:42:09.996Z","updated_at":"2025-08-19T17:42:09.996Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279180730,"owners_count":26120780,"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-10-16T02:00:06.019Z","response_time":53,"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":["library","universal","url","utility"],"created_at":"2024-11-09T15:18:31.278Z","updated_at":"2025-10-16T10:56:33.028Z","avatar_url":"https://github.com/untool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pathifist\n\n[![travis](https://img.shields.io/travis/untool/pathifist/master.svg)](https://travis-ci.org/untool/pathifist)\u0026nbsp;[![npm](https://img.shields.io/npm/v/pathifist.svg)](https://www.npmjs.com/package/pathifist) \u003cbr/\u003e\n\n`pathifist` is an extremely simple, rather naïve URL path manipulation library. It is meant to be used in browser and non-browser environments to conveniently deal with URL(-ish) paths.\n\n### Installation\n\nUsing [NPM](https://www.npmjs.com/get-npm):\n\n```text\nnpm install -S pathifist\n```\n\nUsing [Yarn](https://yarnpkg.com/en/):\n\n```text\nyarn add pathifist\n```\n\n### API\n\n#### `resolve(path, ...)`\n\n`resolve` is `pathifist`'s most elaborate function: it mimics a browser's path resolution and deals with both absolute (e.g. `/foo`) and relative (e.g. `../`) path segments. It accepts an arbitrary number of path segments as arguments.\n\n```javascript\nresolve('foo', '/bar'); // =\u003e /bar\nresolve('./foo', 'bar///', '../baz'); // =\u003e ./foo/baz\n```\n\n#### `join(path, ...)`\n\n`join` glues an arbitrary number of arguments together with slashes, replacing multiple consecutive slashes in the process.\n\n```javascript\njoin('foo', '/bar'); // =\u003e foo/bar\njoin('./foo', 'bar///', '../baz'); // =\u003e ./foo/bar/../baz\n```\n\n#### `dedupeSlashes(path)`\n\n`dedupeSlashes` removes obsolete consecutive slashes from the path it is being passed.\n\n```javascript\ndedupe('//foo//bar//'); // =\u003e /foo/bar/\n```\n\n#### `trimSlashes(path)` / `trim{Leading,Trailing}Slash(path)`\n\n`trimSlashes` / `trim{Leading,Trailing}Slash` removes single or consecutive leading and/or trailing slashes from the `path` it is being passed. It leaves internal slashes untouched.\n\n```javascript\ntrimSlashes('/foo/bar/'); // =\u003e foo/bar\ntrimLeadingSlash('/foo/bar/'); // =\u003e foo/bar/\ntrimTrailingSlash('/foo/bar/'); // =\u003e /foo/bar\n```\n\n#### `ensureSlashes(path)` / `ensure{Leading,Trailing}Slash(path)`\n\n`ensureSlashes` / `ensure{Leading,Trailing}Slash` makes sure there are single or consecutive leading and/or trailing slash in the `path` it is being passed. It leaves internal slash untouched.\n\n```javascript\nensureSlashes('foo/bar'); // =\u003e /foo/bar/\nensureLeadingSlash('foo/bar'); // =\u003e /foo/bar\nensureTrailingSlash('foo/bar'); // =\u003e foo/bar/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtool%2Fpathifist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funtool%2Fpathifist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funtool%2Fpathifist/lists"}