{"id":26348893,"url":"https://github.com/ralekna/peq","last_synced_at":"2025-03-16T08:17:13.605Z","repository":{"id":35072208,"uuid":"201054299","full_name":"ralekna/peq","owner":"ralekna","description":"JavaScript parsing expressions query library","archived":false,"fork":false,"pushed_at":"2022-12-30T18:22:47.000Z","size":124,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T07:40:33.168Z","etag":null,"topics":["api","generator","javascript","parser","peg","pegjs"],"latest_commit_sha":null,"homepage":"","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/ralekna.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":"2019-08-07T13:17:40.000Z","updated_at":"2020-09-22T15:26:48.000Z","dependencies_parsed_at":"2023-01-15T13:13:56.765Z","dependency_job_id":null,"html_url":"https://github.com/ralekna/peq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralekna%2Fpeq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralekna%2Fpeq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralekna%2Fpeq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ralekna%2Fpeq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ralekna","download_url":"https://codeload.github.com/ralekna/peq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841151,"owners_count":20356446,"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":["api","generator","javascript","parser","peg","pegjs"],"created_at":"2025-03-16T08:17:12.935Z","updated_at":"2025-03-16T08:17:13.600Z","avatar_url":"https://github.com/ralekna.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PEQ - JavaScript *P*arsing *E*xpressions *Q*uery library\n\n[![alt Build status](https://api.travis-ci.com/ralekna/peq.svg?branch=master \"Build status\")](https://travis-ci.com/ralekna/peq)\n\nThis library aims to provide a parser generator functionality of [PEG.js](https://github.com/pegjs/pegjs) \nbut in a way where your constructed grammar is a parser itself instead of generating some human unreadable code. Like with jQuery you can query HTML DOM elements, with PEQ provided _matchers_ you can query a string and transform it to any other data structure.\n\n## Usage\n\n### Installation\n`npm i peq`\n\n### Usage in Node.js\n\n```javascript\nconst {grammar, one, oneOf, all, any, not, optional, oneOrMore} = require(\"peq\");\n\nconsole.log(all([`\"`, {name: 'text', matcher: any(/[a-z]/) }, `\"`], (all, {text}) =\u003e text.join(''))(`\"asd\"`));\n// ^ this will output ['asd', '']\n```\n\nAs there's still no more documentation yet, please check [examples folder](https://github.com/ralekna/peq/tree/master/src/examples) \n\n## ToDo\n\n- [x] Setup CI \n- [x] Add examples in code \n- [ ] Add simple usage documentation \n- [ ] Research if there's any missing quantifiers  \n- [ ] Add more human readable CS theory to documentation  \n- [ ] Try more grammars\n- [ ] Convert code to TypeScript\n\n## Contribution and issues\n\nJust open a ticket in Github\n\n## Licence\n\nThis work is licensed under [Apache 2.0](https://opensource.org/licenses/Apache-2.0) open source license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralekna%2Fpeq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralekna%2Fpeq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralekna%2Fpeq/lists"}