{"id":21935974,"url":"https://github.com/mattfors/ngx-web-serial","last_synced_at":"2026-02-01T20:05:28.621Z","repository":{"id":263504132,"uuid":"890606946","full_name":"mattfors/ngx-web-serial","owner":"mattfors","description":"Angular Library for connectin to serial devices using Web Serial API and RxJS","archived":false,"fork":false,"pushed_at":"2024-11-27T01:51:05.000Z","size":153,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T06:39:24.521Z","etag":null,"topics":["angular","serial"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattfors.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-18T21:38:17.000Z","updated_at":"2025-07-24T14:37:49.000Z","dependencies_parsed_at":"2025-10-09T19:31:38.469Z","dependency_job_id":"d5b601f0-aa9c-4297-9ec4-da391d8c73c1","html_url":"https://github.com/mattfors/ngx-web-serial","commit_stats":null,"previous_names":["mattfors/angular-serial","mattfors/ngx-web-serial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattfors/ngx-web-serial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfors%2Fngx-web-serial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfors%2Fngx-web-serial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfors%2Fngx-web-serial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfors%2Fngx-web-serial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattfors","download_url":"https://codeload.github.com/mattfors/ngx-web-serial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattfors%2Fngx-web-serial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28988486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","serial"],"created_at":"2024-11-29T01:12:40.490Z","updated_at":"2026-02-01T20:05:28.602Z","avatar_url":"https://github.com/mattfors.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Publish to GitHub Packages](https://github.com/mattfors/ngx-web-serial/actions/workflows/build.yml/badge.svg)](https://github.com/mattfors/ngx-web-serial/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/mattfors/ngx-web-serial/branch/main/graph/badge.svg?token=GRL2B8OCW5)](https://codecov.io/gh/mattfors/ngx-web-serial)\n\n# NgxWebSerial\n\nNgxWebSerial is an angular library for connecting to serial devices with the Web Serial API and RxJS.\n\nConnecting, transmitting and receiving data are abstracted to RxJS observables which will be familiar to anyone using Angular.\n\n## Installation\n\n```shell\nnpm i ngx-web-serial \n```\n\n## Usage\nBelow demonstrates the basic usage. A pipe is used to accumulate the raw data from the serial port.\n```typescript\nimport { Component } from '@angular/core';\nimport { NgxWebSerial, provideNgxWebSerial } from 'ngx-web-serial';\nimport { Observable, scan } from 'rxjs';\nimport { AsyncPipe } from '@angular/common';\n\n@Component({\n  selector: 'app-root',\n  standalone: true,\n  imports: [AsyncPipe],\n  providers: [provideNgxWebSerial()],\n  template: `\n    \u003cbutton (click)=\"open()\"\u003eOpen\u003c/button\u003e\n    \u003cinput #inputField\n           type=\"text\"\n           (keydown.enter)=\"write(inputField.value); inputField.value=''\"\n           placeholder=\"Type and press Enter\"\u003e\n    \u003cdiv\u003e\n      \u003ctextarea [value]=\"data$ | async\" readonly\u003e\u003c/textarea\u003e\n    \u003c/div\u003e\n  `\n})\nexport class AppComponent {\n\n  data$: Observable\u003cstring\u003e;\n\n  constructor(private serial: NgxWebSerial) {\n    this.data$ = this.serial.read().pipe(\n      scan((acc, value) =\u003e acc + value, '')\n    );\n  }\n\n  open(): void {\n    this.serial.open().subscribe()\n  }\n\n  write(value: string): void {\n    this.serial.write(value).subscribe();\n  }\n\n}\n\n```\n\n## Mock serial device\nThe module can be used with a mock serial device for testing or if you do not have a real serial device. Provide a function which takes and returns a string. In this example, the text transmitted to the serial device will be echoed back with 'Hello'.\n```typescript\nproviders: [provideNgxWebSerialTest(i =\u003e `Hello ${i}!\\n`)]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattfors%2Fngx-web-serial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattfors%2Fngx-web-serial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattfors%2Fngx-web-serial/lists"}