{"id":13725063,"url":"https://github.com/gram-data/gram-js","last_synced_at":"2025-04-15T16:17:58.677Z","repository":{"id":38426705,"uuid":"261717106","full_name":"gram-data/gram-js","owner":"gram-data","description":"Gram in javascript.","archived":false,"fork":false,"pushed_at":"2023-01-08T08:34:41.000Z","size":19581,"stargazers_count":26,"open_issues_count":31,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T13:05:26.696Z","etag":null,"topics":["ast","gram","graph","neo4j","unified"],"latest_commit_sha":null,"homepage":"https://gram-data.github.io/gram-js","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/gram-data.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-06T09:49:59.000Z","updated_at":"2024-09-20T07:28:13.000Z","dependencies_parsed_at":"2023-02-08T05:30:45.103Z","dependency_job_id":null,"html_url":"https://github.com/gram-data/gram-js","commit_stats":null,"previous_names":[],"tags_count":125,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gram-data%2Fgram-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gram-data%2Fgram-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gram-data%2Fgram-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gram-data%2Fgram-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gram-data","download_url":"https://codeload.github.com/gram-data/gram-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248685123,"owners_count":21145208,"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":["ast","gram","graph","neo4j","unified"],"created_at":"2024-08-03T01:02:11.543Z","updated_at":"2025-04-15T16:17:58.655Z","avatar_url":"https://github.com/gram-data.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"`(text)--\u003e(ast)--\u003e(text)`\n\n`gram.js` is a collection of packages for working with the [gram](https://gram-data.github.io)\ntextual format for graph data.\n\nYou can parse `.gram` files into an AST. \n\nOr, you can produce `.gram` files from an existing AST. \n\nThe AST is not a data model. But it does easily maps to a data model. For example see\n[d3-gram](https://github.com/gram-data/d3-gram).\n\n## How to gram in javascript\n\nThe 2 best places to start:\n\n1. Parse from text using [[gram-parse]]\n2. Build an AST by hand using [[gram-builder]]\n\n### All packages\n\n- [[gram]] for general use\n- [[gram-ast]] defines abstract syntax tree types \n- [[gram-builder]] composes a valid AST\n- [[gram-identity]] generates identity. (available as a [unified plugin](https://github.com/unifiedjs/unified#plugin) )\n- [[gram-ops]] extracts features from the AST\n- [[gram-parse]] processes text literal `.gram` into an AST. (available as a [unified plugin](https://github.com/unifiedjs/unified#plugin) )\n- [gram-preset-basic](https://github.com/gram-data/gram-js/tree/main/packages/gram-preset-basic) a [unified preset](https://github.com/unifiedjs/unified#preset) for processing `.gram` files\n- [[gram-stringify]] serializes AST back to text literal format (available as a [unified plugin](https://github.com/unifiedjs/unified#plugin) )\n- [[gram-value]] enrich AST text literals with JS primitive or object values\n\n\n## Credit\n\n### Unified \"Content as structured data\"\n\nGram leverages the excellent [unified](https://unifiedjs.com) framework \"for parsing, inspecting, transforming, and serializing content through syntax trees.\"\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgram-data%2Fgram-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgram-data%2Fgram-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgram-data%2Fgram-js/lists"}