{"_id":"replace-homedir","_rev":"3341786","name":"replace-homedir","description":"Replace user home in a string with another string. Useful for tildifying a path.","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"time":{"modified":"2024-07-10T08:35:32.000Z","created":"2017-12-06T23:27:01.227Z","2.0.0":"2022-01-31T00:10:44.002Z","1.0.0":"2017-12-07T18:30:55.044Z","0.1.0":"2017-12-06T23:27:01.227Z"},"users":{},"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"repository":{"type":"git","url":"git+https://github.com/gulpjs/replace-homedir.git"},"versions":{"2.0.0":{"name":"replace-homedir","version":"2.0.0","description":"Replace user home in a string with another string. Useful for tildifying a path.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/replace-homedir.git"},"license":"MIT","engines":{"node":">= 10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"devDependencies":{"eslint":"^7.32.0","eslint-config-gulp":"^5.0.1","eslint-plugin-node":"^11.1.0","expect":"^27.4.2","mocha":"^8.4.0","nyc":"^15.1.0","sinon":"^12.0.1"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["path","homedir","tilde","replace","subsitute","user home","tilde"],"gitHead":"1744ea97f283a41cbf4ee022d83f8d1eb15fc6a6","bugs":{"url":"https://github.com/gulpjs/replace-homedir/issues"},"homepage":"https://github.com/gulpjs/replace-homedir#readme","_id":"replace-homedir@2.0.0","_nodeVersion":"16.13.0","_npmVersion":"7.24.2","dist":{"shasum":"245bd9c909275e0beee75eae85bb40780cd61903","size":2261,"noattachment":false,"key":"/replace-homedir/-/replace-homedir-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/replace-homedir/download/replace-homedir-2.0.0.tgz"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-homedir_2.0.0_1643587843623_0.31615751882754917"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-31T00:10:49.313Z","publish_time":1643587844002,"_cnpm_publish_time":1643587844002},"1.0.0":{"name":"replace-homedir","version":"1.0.0","description":"Replace user home in a string with another string. Useful for tildifying a path.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/replace-homedir.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint . && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"homedir-polyfill":"^1.0.1","is-absolute":"^1.0.0","remove-trailing-separator":"^1.1.0"},"devDependencies":{"eslint":"^1.7.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.3.5","jscs-preset-gulp":"^1.0.0","mocha":"^2.4.5"},"keywords":["path","homedir","tilde","replace","subsitute","user home","tilde"],"gitHead":"1a902568488cc2e615dd4eb9df651954979a6ad9","bugs":{"url":"https://github.com/gulpjs/replace-homedir/issues"},"homepage":"https://github.com/gulpjs/replace-homedir#readme","_id":"replace-homedir@1.0.0","_shasum":"e87f6d513b928dde808260c12be7fec6ff6e798c","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.48","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"e87f6d513b928dde808260c12be7fec6ff6e798c","size":2314,"noattachment":false,"key":"/replace-homedir/-/replace-homedir-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/replace-homedir/download/replace-homedir-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-homedir-1.0.0.tgz_1512671454919_0.16078897938132286"},"directories":{},"publish_time":1512671455044,"_hasShrinkwrap":false,"_cnpm_publish_time":1512671455044},"0.1.0":{"name":"replace-homedir","version":"0.1.0","description":"Replace user home in a string with another string. Useful for tildifying a path.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/replace-homedir.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint . && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"homedir-polyfill":"^1.0.1","is-absolute":"^1.0.0","remove-trailing-separator":"^1.1.0"},"devDependencies":{"eslint":"^1.7.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.3.5","jscs-preset-gulp":"^1.0.0","mocha":"^2.4.5"},"keywords":["path","homedir","tilde","replace","subsitute","user home","tilde"],"gitHead":"5b453f10c3bcd70c26b4cf874ae587efe1b0f45b","bugs":{"url":"https://github.com/gulpjs/replace-homedir/issues"},"homepage":"https://github.com/gulpjs/replace-homedir#readme","_id":"replace-homedir@0.1.0","_shasum":"65fb6e747ad9786b0d6982a53b2b02f7d605b583","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.48","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"65fb6e747ad9786b0d6982a53b2b02f7d605b583","size":2315,"noattachment":false,"key":"/replace-homedir/-/replace-homedir-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/replace-homedir/download/replace-homedir-0.1.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/replace-homedir-0.1.0.tgz_1512602821173_0.17921618884429336"},"directories":{},"publish_time":1512602821227,"_hasShrinkwrap":false,"_cnpm_publish_time":1512602821227}},"readme":"<p align=\"center\">\n  <a href=\"http://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# replace-homedir\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]\n\nReplace user home in a string with another string. Useful for tildifying a path.\n\n## Usage\n\n```js\nvar replaceHomedir = require('replace-homedir');\n\nvar shortPath = replaceHomedir('/Users/phated/myProject', '~');\n// shortPath === '~/myProject'\n```\n\n## API\n\n### `replaceHomedir(path, replacement)`\n\nTakes a string `path` as the first argument and a string or function `replacement` as the second argument. If the `path` is absolute and begins with the User's homedir, the homedir portion of the path is replaced with `replacement` using String#replace.\n\nIf `path` is not a string, the function will throw.\n\n## License\n\nMIT\n\n[downloads-image]: http://img.shields.io/npm/dm/replace-homedir.svg\n[npm-url]: https://www.npmjs.com/package/replace-homedir\n[npm-image]: http://img.shields.io/npm/v/replace-homedir.svg\n\n[travis-url]: https://travis-ci.org/gulpjs/replace-homedir\n[travis-image]: http://img.shields.io/travis/gulpjs/replace-homedir.svg?label=travis-ci\n\n[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-homedir\n[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-homedir.svg?label=appveyor\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/replace-homedir\n[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-homedir/master.svg\n\n[gitter-url]: https://gitter.im/gulpjs/gulp\n[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg\n","_attachments":{},"homepage":"https://github.com/gulpjs/replace-homedir#readme","bugs":{"url":"https://github.com/gulpjs/replace-homedir/issues"},"license":"MIT"}