{"id":13396717,"url":"https://github.com/sindresorhus/slash","last_synced_at":"2025-05-15T01:04:14.812Z","repository":{"id":9595977,"uuid":"11516031","full_name":"sindresorhus/slash","owner":"sindresorhus","description":"Convert Windows backslash paths to slash paths","archived":false,"fork":false,"pushed_at":"2023-05-09T17:07:05.000Z","size":27,"stargazers_count":335,"open_issues_count":0,"forks_count":53,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-06T07:23:46.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2013-07-18T23:26:17.000Z","updated_at":"2025-04-30T10:22:01.000Z","dependencies_parsed_at":"2022-09-25T06:40:38.033Z","dependency_job_id":"9bd2690a-3269-4e1d-8820-3b415db8283e","html_url":"https://github.com/sindresorhus/slash","commit_stats":{"total_commits":33,"total_committers":8,"mean_commits":4.125,"dds":"0.21212121212121215","last_synced_commit":"98b618f5a3bfcb5dd374b204868818845b87bb2f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fslash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fslash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fslash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fslash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/slash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"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","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":[],"created_at":"2024-07-30T18:01:00.900Z","updated_at":"2025-05-15T01:04:14.778Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":["路径","JavaScript","GIT 仓库","目录"],"sub_categories":["文件系统"],"readme":"# slash\n\n\u003e Convert Windows backslash paths to slash paths: `foo\\\\bar` ➔ `foo/bar`\n\n[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths.\n\nThis was created since the `path` methods in Node.js outputs `\\\\` paths on Windows.\n\n## Install\n\n```sh\nnpm install slash\n```\n\n## Usage\n\n```js\nimport path from 'node:path';\nimport slash from 'slash';\n\nconst string = path.join('foo', 'bar');\n// Unix    =\u003e foo/bar\n// Windows =\u003e foo\\\\bar\n\nslash(string);\n// Unix    =\u003e foo/bar\n// Windows =\u003e foo/bar\n```\n\n## API\n\n### slash(path)\n\nType: `string`\n\nAccepts a Windows backslash path and returns a path with forward slashes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fslash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fslash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fslash/lists"}