{"id":15674538,"url":"https://github.com/jonschlinkert/resolve-dir","last_synced_at":"2025-07-27T13:16:16.212Z","repository":{"id":57354674,"uuid":"42895330","full_name":"jonschlinkert/resolve-dir","owner":"jonschlinkert","description":"Resolve a directory that is either local, global or in the user's home directory.","archived":false,"fork":false,"pushed_at":"2017-08-05T23:46:06.000Z","size":11,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-08T03:34:16.966Z","etag":null,"topics":["expand","file","javascript","jonschlinkert","nodejs","path","resolve","tilde","tilde-expansion"],"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-09-21T21:44:17.000Z","updated_at":"2023-09-08T17:01:55.000Z","dependencies_parsed_at":"2022-09-12T03:40:09.870Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/resolve-dir","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jonschlinkert/resolve-dir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fresolve-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fresolve-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fresolve-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fresolve-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/resolve-dir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fresolve-dir/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267363400,"owners_count":24075313,"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-07-27T02:00:11.917Z","response_time":82,"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":["expand","file","javascript","jonschlinkert","nodejs","path","resolve","tilde","tilde-expansion"],"created_at":"2024-10-03T15:46:27.595Z","updated_at":"2025-07-27T13:16:16.135Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# resolve-dir [![NPM version](https://img.shields.io/npm/v/resolve-dir.svg?style=flat)](https://www.npmjs.com/package/resolve-dir) [![NPM downloads](https://img.shields.io/npm/dm/resolve-dir.svg?style=flat)](https://npmjs.org/package/resolve-dir) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/resolve-dir.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/resolve-dir)\n\n\u003e Resolve a directory that is either local, global or in the user's home directory.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save resolve-dir\n```\n\n## Usage\n\n```js\nvar resolve = require('resolve-dir');\n```\n\nReturns a local directory path unchanged\n\n```js\nresolve('a')\n//=\u003e 'a'\n```\n\nResolves the path to user home\n\n```js\nresolve('~')\n//=\u003e '/Users/jonschlinkert'\nresolve('~/foo')\n//=\u003e '/Users/jonschlinkert/foo'\n```\n\nResolves the path to global npm modules\n\n```js\nresolve('@')\n//=\u003e '/usr/local/lib/node_modules'\nresolve('@/foo')\n//=\u003e '/usr/local/lib/node_modules/foo'\n```\n\n## About\n\n### Related projects\n\n* [expand-tilde](https://www.npmjs.com/package/expand-tilde): Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the… [more](https://github.com/jonschlinkert/expand-tilde) | [homepage](https://github.com/jonschlinkert/expand-tilde \"Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.\")\n* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/cowboy/node-findup-sync) | [homepage](https://github.com/cowboy/node-findup-sync \"Find the first file matching a given pattern in the current directory or the nearest ancestor directory.\")\n* [resolve-modules](https://www.npmjs.com/package/resolve-modules): Resolves local and global npm modules that match specified patterns, and returns a configuration object… [more](https://github.com/jonschlinkert/resolve-modules) | [homepage](https://github.com/jonschlinkert/resolve-modules \"Resolves local and global npm modules that match specified patterns, and returns a configuration object for each resolved module.\")\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 document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_\n\nTo generate the readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install -g verb verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/resolve-dir/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 18, 2016._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fresolve-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fresolve-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fresolve-dir/lists"}