{"id":15679554,"url":"https://github.com/jonschlinkert/project-name","last_synced_at":"2025-05-01T02:35:04.674Z","repository":{"id":57331139,"uuid":"44612661","full_name":"jonschlinkert/project-name","owner":"jonschlinkert","description":"Get the name of a project from package.json, git config, or basename of the current working directory.","archived":false,"fork":false,"pushed_at":"2023-07-28T01:02:19.000Z","size":25,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T08:00:41.616Z","etag":null,"topics":["basename","cwd","generate","generator","git-config","javascript","jonschlinkert","nodejs","project","scaffold","scaffolding","yeoman"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"jonschlinkert","tidelift":"npm/project-name"}},"created_at":"2015-10-20T14:39:42.000Z","updated_at":"2023-07-28T01:02:25.000Z","dependencies_parsed_at":"2024-06-18T15:39:13.217Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/project-name","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.06666666666666665,"last_synced_commit":"8721969ecfec3adff73054f450035cfe4bc2144a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fproject-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fproject-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fproject-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fproject-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/project-name/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812833,"owners_count":21647974,"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":["basename","cwd","generate","generator","git-config","javascript","jonschlinkert","nodejs","project","scaffold","scaffolding","yeoman"],"created_at":"2024-10-03T16:33:05.562Z","updated_at":"2025-05-01T02:35:04.650Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":["https://github.com/sponsors/jonschlinkert","https://tidelift.com/funding/github/npm/project-name"],"categories":[],"sub_categories":[],"readme":"# project-name [![NPM version](https://img.shields.io/npm/v/project-name.svg?style=flat)](https://www.npmjs.com/package/project-name) [![NPM monthly downloads](https://img.shields.io/npm/dm/project-name.svg?style=flat)](https://npmjs.org/package/project-name) [![NPM total downloads](https://img.shields.io/npm/dt/project-name.svg?style=flat)](https://npmjs.org/package/project-name) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/project-name.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/project-name)\n\n\u003e Get the name of a project, from package.json, git config, or basename of the current working directory.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save project-name\n```\n\nInstall [Type Definitions](https://www.npmjs.com/package/@types/project-name)\n\n```sh\n$ npm install --save @types/project-name\n```\n\n## Usage\n\nRequires [Node.js](https://nodejs.org/en/) \u003e=8.\n\n**Project name**\n\nThe project name is resolved in this order:\n\n1. Check for package.json, if it exists `name` is returned\n2. Check for git repository, if it exists return the `name` parsed from the remote origin URL\n3. Otherwise, use `path.basename(process.cwd())`\n\n```js\nconst name = require('project-name');\nconsole.log(name());\n// or\nconsole.log(name('some/file/path'));\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\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\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\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\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [git-repo-name](https://www.npmjs.com/package/git-repo-name): Get the repository name from the git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-repo-name \"Get the repository name from the git remote origin URL.\")\n* [git-user-email](https://www.npmjs.com/package/git-user-email): Get the email address of the current user from git config. | [homepage](https://github.com/jonschlinkert/git-user-email \"Get the email address of the current user from git config.\")\n* [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name \"Get a user's name from git config at the project or global scope, depending on what git uses in the current context.\")\n* [git-username](https://www.npmjs.com/package/git-username): Get the username (or 'owner' name) from a git/GitHub remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username \"Get the username (or 'owner' name) from a git/GitHub remote origin URL.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [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.8.0, on December 10, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fproject-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fproject-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fproject-name/lists"}