{"id":19441543,"url":"https://github.com/standard/deglob","last_synced_at":"2025-09-12T03:42:19.863Z","repository":{"id":34856836,"uuid":"38853708","full_name":"standard/deglob","owner":"standard","description":":open_file_folder: Take a list of glob patterns and return an array of file locations, respecting `.gitignore` and allowing for ignore patterns via `package.json`.","archived":false,"fork":false,"pushed_at":"2023-09-16T07:31:15.000Z","size":35,"stargazers_count":40,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-10T22:40:05.924Z","etag":null,"topics":["glob","glob-pattern","javascript","nodejs","patterns"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/standard.png","metadata":{"funding":{"github":["standard","feross"]},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2015-07-10T01:18:45.000Z","updated_at":"2024-08-23T18:04:09.000Z","dependencies_parsed_at":"2024-06-18T14:43:18.867Z","dependency_job_id":"467a362c-4217-409d-9f4b-cc80f245727e","html_url":"https://github.com/standard/deglob","commit_stats":{"total_commits":54,"total_committers":9,"mean_commits":6.0,"dds":"0.37037037037037035","last_synced_commit":"502f26cf0bcd7d54f3144cc78c0ea1d8aa871b82"},"previous_names":["flet/deglob"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/standard/deglob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standard%2Fdeglob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standard%2Fdeglob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standard%2Fdeglob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standard%2Fdeglob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/standard","download_url":"https://codeload.github.com/standard/deglob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standard%2Fdeglob/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274748926,"owners_count":25342038,"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-09-12T02:00:09.324Z","response_time":60,"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":["glob","glob-pattern","javascript","nodejs","patterns"],"created_at":"2024-11-10T15:36:11.009Z","updated_at":"2025-09-12T03:42:19.842Z","avatar_url":"https://github.com/standard.png","language":"JavaScript","funding_links":["https://github.com/sponsors/standard","https://github.com/sponsors/feross"],"categories":[],"sub_categories":[],"readme":"# deglob [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/standard/deglob/master.svg\n[travis-url]: https://travis-ci.org/standard/deglob\n[npm-image]: https://img.shields.io/npm/v/deglob.svg\n[npm-url]: https://npmjs.org/package/deglob\n[downloads-image]: https://img.shields.io/npm/dm/deglob.svg\n[downloads-url]: https://npmjs.org/package/deglob\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\nTake a list of glob patterns and return an array of file locations, respecting `.gitignore` and allowing for ignore patterns via `package.json`.\n\nGiant swaths of this code were extracted from [standard](https://standardjs.com). It seems useful outside of that tool, so I've attempted to extract it! :)\n\n## Install\n\n```\nnpm install --save deglob\n```\n\n## Usage\n\n```js\nvar deglob = require('deglob')\n\ndeglob(['**/*.js'], function(err, files) {\n  files.forEach(function(file) {\n    console.log('found file ' + file)\n  })\n})\n\n// pass in some options to customize!\n\nvar path = require('path')\nvar opts = {\n  cwd: path.join(__dirname, 'someDir'),\n  useGitIgnore: false,\n  usePackageJson: false\n}\n\ndeglob(['**/*.js'], opts, function(err, files) {\n  files.forEach(function(file) {\n    console.log('found file ' + file)\n  })\n})\n```\n\n## Ignoring files in package.json\n`deglob` will look for a `package.json` file by default and use any ignore patterns defined.\n\nTo define patterns in package.json add somthing like this:\n```js\n\"config\": {\n  \"ignore\": ['**/*.bad']\n}\n```\nIf you do not fancy the `config` key, provide a different one using the `configKey` option.\n\n\n## Options\nOption         | Default       | Description\n-------------- | --------      | -------\nuseGitIgnore   | true          | Turn on/off allowing ignore patterns via `.gitignore`\nusePackageJson | true          | Turn on/off allowing ignore patterns via `package.json` config.\nconfigKey      | 'config'      | This is the parent key in `package.json` to look for the `ignore` attribute.\ngitIgnoreFile  | '.gitignore'  | Name of the `.gitignore` file look for (probably best to leave it default)\nignore         | []            | List of additional ignore patterns to use\ncwd            | process.cwd() | This is the working directory to start the deglobbing\n\n## Contributing\n\nContributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.\n\n## License\n\n[ISC](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstandard%2Fdeglob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstandard%2Fdeglob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstandard%2Fdeglob/lists"}