{"id":15647842,"url":"https://github.com/jonschlinkert/unixify","last_synced_at":"2025-04-09T17:25:42.040Z","repository":{"id":55153027,"uuid":"43627312","full_name":"jonschlinkert/unixify","owner":"jonschlinkert","description":"Convert a windows file path to a unix-style file path.","archived":false,"fork":false,"pushed_at":"2021-01-06T16:11:51.000Z","size":9,"stargazers_count":44,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T11:51:50.325Z","etag":null,"topics":["filepath","normalize","path","posix","slash","slashes","unix"],"latest_commit_sha":null,"homepage":null,"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/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-04T06:25:41.000Z","updated_at":"2024-10-30T01:11:30.000Z","dependencies_parsed_at":"2022-08-14T13:40:21.471Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/unixify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funixify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funixify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funixify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funixify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/unixify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075960,"owners_count":21043679,"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":["filepath","normalize","path","posix","slash","slashes","unix"],"created_at":"2024-10-03T12:21:32.457Z","updated_at":"2025-04-09T17:25:42.016Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# unixify [![NPM version](https://img.shields.io/npm/v/unixify.svg?style=flat)](https://www.npmjs.com/package/unixify) [![NPM monthly downloads](https://img.shields.io/npm/dm/unixify.svg?style=flat)](https://npmjs.org/package/unixify) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unixify.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/unixify)\n\n\u003e Convert Windows file paths to unix paths.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save unixify\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add unixify\n```\n\n## Usage\n\n```js\nvar unixify = require('unixify');\nunixify(filepath[, stripTrailingSlash]);\n```\n\n**Strips leading drive letters and dot-slash (`./`)**\n\n```js\nunixify('.\\\\one\\\\two\\\\three');  //=\u003e 'one/two/three'\nunixify('./one/two/three');     //=\u003e 'one/two/three'\nunixify('C:\\\\one\\\\two\\\\three'); //=\u003e '/one/two/three'\nunixify('\\\\one\\\\two\\\\three');   //=\u003e '/one/two/three'\n```\n\n**Normalizes path separators to forward slashes**\n\n```js\nunixify('one\\\\two\\\\three');      //=\u003e 'one/two/three'\nunixify('\\\\one\\\\two\\\\three');    //=\u003e '/one/two/three'\nunixify('C:\\\\one\\\\two\\\\three');  //=\u003e '/one/two/three'\n```\n\n**Combines multiple consecutive slashes**\n\n```js\nunixify('one//two//////three'),     //=\u003e 'one/two/three'\nunixify('\\\\one\\\\two\\\\//three');     //=\u003e '/one/two/three'\nunixify('C:\\\\//one\\\\two\\\\//three'); //=\u003e '/one/two/three'\n```\n\n**Strips trailing slashes by default**\n\n```js\nunixify('one//two//////three//'), //=\u003e 'one/two/three'\nunixify('C:\\\\one\\\\two\\\\three\\\\'); //=\u003e '/one/two/three'\n```\n\n**Keep trailing slashes**\n\nBy passing `false` as the second argument\n\n```js\nunixify('one//two//////three//'), //=\u003e 'one/two/three/'\nunixify('C:\\\\one\\\\two\\\\three\\\\'); //=\u003e '/one/two/three/'\n```\n\n## About\n\n### Related projects\n\n* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path \"Return true if a file path contains the given path.\")\n* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with \"Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.\")\n* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute \"Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.\")\n* [normalize-path](https://www.npmjs.com/package/normalize-path): Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a… [more](https://github.com/jonschlinkert/normalize-path) | [homepage](https://github.com/jonschlinkert/normalize-path \"Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.\")\n* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with \"Return `true` if a file path ends with the given string/suffix.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Funixify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Funixify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Funixify/lists"}