{"id":22308821,"url":"https://github.com/ratson/gitignore-to-ast","last_synced_at":"2025-03-26T01:29:03.779Z","repository":{"id":57151874,"uuid":"97057957","full_name":"ratson/gitignore-to-ast","owner":"ratson","description":"Parse .gitignore file to AST","archived":false,"fork":false,"pushed_at":"2017-07-12T22:45:55.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T22:19:51.057Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ratson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-12T22:44:25.000Z","updated_at":"2017-07-12T22:44:53.000Z","dependencies_parsed_at":"2022-08-26T13:11:46.710Z","dependency_job_id":null,"html_url":"https://github.com/ratson/gitignore-to-ast","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgitignore-to-ast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgitignore-to-ast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgitignore-to-ast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fgitignore-to-ast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratson","download_url":"https://codeload.github.com/ratson/gitignore-to-ast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571304,"owners_count":20637318,"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-12-03T20:15:28.910Z","updated_at":"2025-03-26T01:29:03.761Z","avatar_url":"https://github.com/ratson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitignore-to-ast\n\nParse .gitignore file to AST\n\n## Installation\n\n```\nnpm install gitignore-to-ast --save\n```\n\n## Usage\n\n\u003c!-- eslint-disable strict,no-unused-vars --\u003e\n\n```js\nconst parseGitignore = require('gitignore-to-ast')\nconst parsed = parseGitignore('# comment\\n*\\r\\n\\n!.gitignore')\nconst result = {\n  type: 'root',\n  body: [\n    {\n      type: 'comment',\n      value: '# comment',\n      line: 1,\n    },\n    {\n      type: 'rule',\n      value: '*',\n      line: 2,\n    },\n    {\n      type: 'rule',\n      value: '!.gitignore',\n      line: 4,\n    },\n  ],\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fgitignore-to-ast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratson%2Fgitignore-to-ast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fgitignore-to-ast/lists"}