{"id":20963850,"url":"https://github.com/codemix/gitignore-parser","last_synced_at":"2025-04-09T09:06:14.787Z","repository":{"id":15701435,"uuid":"18439283","full_name":"codemix/gitignore-parser","owner":"codemix","description":"A simple .gitignore parser for node.js","archived":false,"fork":false,"pushed_at":"2017-08-15T00:39:25.000Z","size":197,"stargazers_count":98,"open_issues_count":7,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T15:57:31.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-04T13:10:32.000Z","updated_at":"2024-11-22T16:28:08.000Z","dependencies_parsed_at":"2022-08-26T22:52:57.618Z","dependency_job_id":null,"html_url":"https://github.com/codemix/gitignore-parser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fgitignore-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fgitignore-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fgitignore-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fgitignore-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemix","download_url":"https://codeload.github.com/codemix/gitignore-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008629,"owners_count":21032556,"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":[],"created_at":"2024-11-19T02:48:36.310Z","updated_at":"2025-04-09T09:06:14.759Z","avatar_url":"https://github.com/codemix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitignore Parser\n\nA very simple `.gitignore` parser for node.js.\n\n[![Build Status](https://travis-ci.org/codemix/gitignore-parser.svg?branch=master)](https://travis-ci.org/codemix/gitignore-parser)\n\n\n## Installation\n\n`npm install gitignore-parser`\n\n\n## Usage\n\n```js\nvar parser = require('gitignore-parser'),\n    fs = require('fs');\n\nvar gitignore = parser.compile(fs.readFileSync('.gitignore', 'utf8'));\n\ngitignore.accepts('LICENSE.md') === true;\ngitignore.denies('LICENSE.md') === false;\n\ngitignore.accepts('node_modules/mocha/bin') === false;\ngitignore.denies('node_modules/mocha/bin') === true;\n\n\nvar files = [\n  '.gitignore',\n  '.travis.yml',\n  'LICENSE.md',\n  'README.md',\n  'package.json',\n  'lib/index.js',\n  'test/index.js',\n  'test/mocha.opts',\n  'node_modules/mocha/bin/mocha',\n  'node_modules/mocha/README.md'\n];\n\n// only files that are not gitignored\nfiles.filter(gitignore.accepts);\n\n// only files that *are* gitignored\nfiles.filter(gitignore.denies);\n\n```\n\n\n### License\n\nApache 2, see [LICENSE.md](./LICENSE.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fgitignore-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemix%2Fgitignore-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fgitignore-parser/lists"}