{"id":21158228,"url":"https://github.com/simbo/path-slashes","last_synced_at":"2026-05-17T12:33:13.739Z","repository":{"id":57148561,"uuid":"330212873","full_name":"simbo/path-slashes","owner":"simbo","description":"A javascript library to add or remove trailing and/or leading slashes in path strings, test for their existence or join path strings with slashes without duplicating them.","archived":false,"fork":false,"pushed_at":"2023-05-07T23:17:18.000Z","size":493,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T08:11:24.986Z","etag":null,"topics":["javascript","join","leading","path","slash","slashes","string","trailing","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/simbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2021-01-16T17:04:11.000Z","updated_at":"2023-06-13T08:17:34.000Z","dependencies_parsed_at":"2024-10-04T09:14:45.246Z","dependency_job_id":"bd5c47f1-141e-4398-80d7-d8d9f701a35b","html_url":"https://github.com/simbo/path-slashes","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/simbo/path-slashes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fpath-slashes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fpath-slashes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fpath-slashes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fpath-slashes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simbo","download_url":"https://codeload.github.com/simbo/path-slashes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fpath-slashes/sbom","scorecard":{"id":824272,"data":{"date":"2025-08-11","repo":{"name":"github.com/simbo/path-slashes","commit":"fb61c01906937a1d40337b8af8fcc79e4838e132"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/23 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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/simbo/path-slashes/release.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   2 out of   2 npmCommand dependencies pinned"],"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.0.1 not signed: https://api.github.com/repos/simbo/path-slashes/releases/102142981","Warn: release artifact v2.0.0 not signed: https://api.github.com/repos/simbo/path-slashes/releases/101683570","Warn: release artifact v2.0.1 does not have provenance: https://api.github.com/repos/simbo/path-slashes/releases/102142981","Warn: release artifact v2.0.0 does not have provenance: https://api.github.com/repos/simbo/path-slashes/releases/101683570"],"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":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","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-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","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-23T16:19:25.449Z","repository_id":57148561,"created_at":"2025-08-23T16:19:25.449Z","updated_at":"2025-08-23T16:19:25.449Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33138351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["javascript","join","leading","path","slash","slashes","string","trailing","typescript"],"created_at":"2024-11-20T12:18:52.822Z","updated_at":"2026-05-17T12:33:13.711Z","avatar_url":"https://github.com/simbo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Path Slashes\n\n[![npm Package Version](https://img.shields.io/npm/v/path-slashes?)](https://www.npmjs.com/package/path-slashes)\n[![Package Dependencies](https://img.shields.io/badge/deps-none-4cc552)](https://www.npmjs.com/package/path-slashes?activeTab=dependencies)\n[![Coveralls github](https://img.shields.io/coveralls/github/simbo/path-slashes)](https://coveralls.io/github/simbo/path-slashes)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/simbo/path-slashes/ci.yml?branch=main)](https://github.com/simbo/path-slashes/actions/workflows/ci.yml)\n[![GitHub Repo](https://img.shields.io/badge/repo-public-87ceeb)](https://github.com/simbo/path-slashes)\n[![License MIT](https://img.shields.io/badge/license-MIT-4cc552)](http://simbo.mit-license.org/)\n\nA javascript library to add or remove trailing and/or leading slashes in path\nstrings, test for their existence or join path strings with slashes without\nduplicating them.\n\n---\n\n## Install\n\nThis package is published to the npm registry as\n[`path-slahes`](https://www.npmjs.com/package/path-slashes).\n\nYou can install it:\n\n```sh\n# using npm:\nnpm install --save path-slashes\n\n# using yarn:\nyarn add path-slashes\n```\n\nℹ️ **HINT**: This library is a pure ESM package. (You may want to\n[read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).)\n\n## Usage Examples\n\n```js\nimport { hasLeadingSlash } from 'path-slashes';\n\n// Check if given path has a leading slash\nhasLeadingSlash('/foo'); // -\u003e true\nhasLeadingSlash('foo'); // -\u003e false\n```\n\n```js\nimport { hasTrailingSlash } from 'path-slashes';\n\n// Check if given path has a trailing slash\nhasTrailingSlash('foo/'); // -\u003e true\nhasTrailingSlash('foo'); // -\u003e false\n```\n\n```js\nimport { withLeadingSlash } from 'path-slashes';\n\n// Ensure given path has a leading slash\nwithLeadingSlash('foo'); // -\u003e '/foo'\n```\n\n```js\nimport { withTrailingSlash } from 'path-slashes';\n\n// Ensure given path has a trailing slash\nwithTrailingSlash('foo'); // -\u003e 'foo/'\n```\n\n```js\nimport { withoutLeadingSlash } from 'path-slashes';\n\n// Ensure given path has no leading slash\nwithoutLeadingSlash('/foo/'); // -\u003e 'foo/'\n```\n\n```js\nimport { withoutTrailingSlash } from 'path-slashes';\n\n// Ensure given path has no trailing slash\nwithoutTrailingSlash('/foo/'); // -\u003e '/foo'\n```\n\n```js\nimport { withSlashes } from 'path-slashes';\n\n// Ensure given path has both leading and trailing slashes\nwithSlashes('foo'); // -\u003e '/foo/'\n```\n\n```js\nimport { withoutSlashes } from 'path-slashes';\n\n// Ensure given path has neither leading nor trailing slashes\nwithoutSlashes('/foo/'); // -\u003e 'foo'\n```\n\n```js\nimport { slashJoin } from 'path-slashes';\n\n// Join path parts and add slashes where necessary\nslashJoin('foo', 'bar/', '/baz'); // -\u003e 'foo/bar/baz'\n```\n\n## API\n\n```ts\nfunction hasLeadingSlash(path: string): boolean;\n```\n\n```ts\nfunction hasTrailingSlash(path: string): boolean;\n```\n\n```ts\nfunction withLeadingSlash(path: string): string;\n```\n\n```ts\nfunction withTrailingSlash(path: string): string;\n```\n\n```ts\nfunction withSlashes(path: string): string;\n```\n\n```ts\nfunction withoutLeadingSlash(path: string): string;\n```\n\n```ts\nfunction withoutTrailingSlash(path: string): string;\n```\n\n```ts\nfunction withoutSlashes(path: string): string;\n```\n\n```ts\nfunction slashJoin(...strings: (string | string[])[]): string;\n```\n\n## License and Author\n\n[MIT \u0026copy; Simon Lepel](http://simbo.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Fpath-slashes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimbo%2Fpath-slashes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Fpath-slashes/lists"}