{"id":21214761,"url":"https://github.com/regexhq/dotfile-regex","last_synced_at":"2025-07-02T20:32:22.934Z","repository":{"id":26210599,"uuid":"29656943","full_name":"regexhq/dotfile-regex","owner":"regexhq","description":"Regular expresson for matching dotfiles.","archived":false,"fork":false,"pushed_at":"2017-07-01T21:33:57.000Z","size":12,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-21T20:52:16.465Z","etag":null,"topics":["dotfile","file","filepath","match","path","regex","regular-expression","test"],"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/regexhq.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-01-22T04:42:59.000Z","updated_at":"2022-01-17T20:42:52.000Z","dependencies_parsed_at":"2022-07-24T10:00:06.094Z","dependency_job_id":null,"html_url":"https://github.com/regexhq/dotfile-regex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/regexhq/dotfile-regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexhq%2Fdotfile-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexhq%2Fdotfile-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexhq%2Fdotfile-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexhq%2Fdotfile-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regexhq","download_url":"https://codeload.github.com/regexhq/dotfile-regex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regexhq%2Fdotfile-regex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261973424,"owners_count":23238561,"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":["dotfile","file","filepath","match","path","regex","regular-expression","test"],"created_at":"2024-11-20T21:30:38.824Z","updated_at":"2025-07-02T20:32:22.889Z","avatar_url":"https://github.com/regexhq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotfile-regex [![NPM version](https://img.shields.io/npm/v/dotfile-regex.svg?style=flat)](https://www.npmjs.com/package/dotfile-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/dotfile-regex.svg?style=flat)](https://npmjs.org/package/dotfile-regex) [![NPM total downloads](https://img.shields.io/npm/dt/dotfile-regex.svg?style=flat)](https://npmjs.org/package/dotfile-regex) [![Linux Build Status](https://img.shields.io/travis/regexhq/dotfile-regex.svg?style=flat\u0026label=Travis)](https://travis-ci.org/regexhq/dotfile-regex)\n\n\u003e Regular expresson for matching dotfiles.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save dotfile-regex\n```\n\n## Usage\n\nTo be considered a dot **file**:\n\n* the path must contain a dot that is at the beginning of the string or following a slash\n* the next character after the dot must not be another dot\n* one or more characters must follow the dot\n* a slash must not follow the dot\n\nTo check for dot **directories**, use [dotdir-regex](https://github.com/regexps/dotdir-regex) instead.\n\n```js\nvar dotfileRegex = require('dotfile-regex');\n\ndotfileRegex().test('a/b/c.js');\n//=\u003e false\n\ndotfileRegex().test('./git');\n//=\u003e false\n\ndotfileRegex().test('.git/foo');\n//=\u003e false\n\ndotfileRegex().test('.gitignore');\n//=\u003e true\n\ndotfileRegex().test('a/b/c/.gitignore');\n//=\u003e true\n```\n\n## About\n\n### Related projects\n\n* [dotdir-regex](https://www.npmjs.com/package/dotdir-regex): Regex for matching dot-directories, like `.git/` | [homepage](https://github.com/regexps/dotdir-regex \"Regex for matching dot-directories, like `.git/`\")\n* [is-dotdir](https://www.npmjs.com/package/is-dotdir): Returns true if a path is a dot-directory. | [homepage](https://github.com/jonschlinkert/is-dotdir \"Returns true if a path is a dot-directory.\")\n* [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile \"Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 3 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 1 | [popomore](https://github.com/popomore) |\n| 1 | [johnotander](https://github.com/johnotander) |\n| 1 | [sindresorhus](https://github.com/sindresorhus) |\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.6.0, on May 30, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregexhq%2Fdotfile-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregexhq%2Fdotfile-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregexhq%2Fdotfile-regex/lists"}