{"id":16022854,"url":"https://github.com/smacker/in-browser-uast","last_synced_at":"2026-06-18T03:34:01.349Z","repository":{"id":57151946,"uuid":"135190451","full_name":"smacker/in-browser-uast","owner":"smacker","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-12T16:34:58.000Z","size":263,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T02:26:04.545Z","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/smacker.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":"2018-05-28T17:25:45.000Z","updated_at":"2018-12-12T12:55:31.000Z","dependencies_parsed_at":"2022-09-03T14:51:26.580Z","dependency_job_id":null,"html_url":"https://github.com/smacker/in-browser-uast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smacker/in-browser-uast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fin-browser-uast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fin-browser-uast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fin-browser-uast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fin-browser-uast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smacker","download_url":"https://codeload.github.com/smacker/in-browser-uast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smacker%2Fin-browser-uast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34475375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"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":[],"created_at":"2024-10-08T18:42:18.304Z","updated_at":"2026-06-18T03:34:01.333Z","avatar_url":"https://github.com/smacker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bblfsh javascript client\n\n* use web grpc to call bblfsh\n* use libuast compiled to WASM for uast filtering\n\n## Installation\n\n```bash\nyarn add bblfsh\n```\n\nThe WASM module from `node_modules/dist/libuast.wasm` must be available as `/libuast.wasm` in a browser.\n\nIt's possible to change the public path to the file like this:\n\n```js\nconst libuast = initLibuast({\n  locateFile(path) {\n    if(path.endsWith('.wasm')) {\n      return '/some/other/path/libuast.wasm';\n    }\n    return path;\n  }\n});\n```\n\n## Usage\n\n### Client\n\n```js\nimport Client from 'bblfsh';\n\nconst client = new Client('\u003cweb-grpc-address\u003e');\n\nclient.parse(sourceCode, filename, language)\n  .then(r =\u003e /* gRPC response */)\n  .catch(err =\u003e /* or error */);\n```\n\n### Libuast\n\n```js\nimport { protoToMap, initLibuast } from 'bblfsh';\n\nconst libuast = initLibuast();\nconst uastMapping = protoToMap(uast);\n\nlibuast.filter(nodeId, uastMapping, xpathQuery)\n  .then(ids =\u003e /* list of nodes */)\n  .catch(err =\u003e /* or error */);\n\n```\n\nFull API documentation available here: [API.md](API.md).\n\n## Run examples locally\n\n```\ndocker-compose up\n```\n\nThe example app will be available on http://127.0.0.1:8444\n\nPlease check Dockerfile in the app example directory to run it without docker\n\n### Backend dependencies without docker\n\n* run [bblfsh server](https://github.com/bblfsh/bblfshd/) on 9432 port\n* run [grpc proxy](https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy) `grpcwebproxy --backend_addr=127.0.0.1:9432 --run_tls_server=false`\n\n## Development:\n\n### Requirements:\n\n* nodejs + yarn\n* python2.7\n* build tools: cmake autoconf libtool automake pkg-config make\n* [emscripten](http://kripken.github.io/emscripten-site/) (v1.38.8+)\n* [protoc](https://github.com/google/protobuf)\n\n### Commands\n\n- `yarn build` - build everything\n- `yarn build:proto` - generate js from protobuf files\n- `yarn build:libs` - download \u0026 build C dependencies for libuast\n- `yarn build:wasm`- generate WASM \u0026 js helper for libuast\n- `yarn build:bundle` - generate library as a bundle with all dependencies included\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmacker%2Fin-browser-uast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmacker%2Fin-browser-uast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmacker%2Fin-browser-uast/lists"}