{"id":19041922,"url":"https://github.com/writetome51/file-reader-service","last_synced_at":"2025-10-05T23:29:45.493Z","repository":{"id":57169560,"uuid":"246155624","full_name":"writetome51/file-reader-service","owner":"writetome51","description":"Abstract TypeScript/JavaScript class that simplifies using FileReader","archived":false,"fork":false,"pushed_at":"2020-08-06T23:37:36.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T21:31:12.724Z","etag":null,"topics":["abstract","class","file","filereader","reader","typescript"],"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/writetome51.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}},"created_at":"2020-03-09T22:32:57.000Z","updated_at":"2020-08-06T23:37:38.000Z","dependencies_parsed_at":"2022-09-13T22:53:19.250Z","dependency_job_id":null,"html_url":"https://github.com/writetome51/file-reader-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/writetome51/file-reader-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Ffile-reader-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Ffile-reader-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Ffile-reader-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Ffile-reader-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/file-reader-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Ffile-reader-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278534174,"owners_count":26002705,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"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":["abstract","class","file","filereader","reader","typescript"],"created_at":"2024-11-08T22:33:22.295Z","updated_at":"2025-10-05T23:29:45.463Z","avatar_url":"https://github.com/writetome51.png","language":"TypeScript","readme":"# FileReaderService\n\nAbstract TypeScript/JavaScript class that simplifies using [FileReader](https://developer.mozilla.org/en-US/docs/Web/API/FileReader).  \nMake subclasses that read a file as text, data url, array buffer, or binary string.\n\n## Examples\n```ts\nexport class TextFileReaderService extends FileReaderService {\n\n    constructor(){\n        super('readAsText');\n    }\n\n}\n\nexport class DataURLFileReaderService extends FileReaderService {\n\n    constructor(){\n        super('readAsDataURL');\n    }\n\n}\n```\n\n## Constructor\n```ts\nconstructor(\n    __readMethod: 'readAsText' | 'readAsDataURL' | 'readAsArrayBuffer' | 'readAsBinaryString'\n) \n```\n\n## Properties\n```ts\nisReading: boolean // read-only\n```\n\n## Methods\n```ts\nasync getContents(file: Blob): Promise\u003cany\u003e\n```\n\n\n## Installation\n\n`npm i @writetome51/file-reader-service`\n\n## Loading\n```js\nimport { FileReaderService } from '@writetome51/file-reader-service';\n```\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Ffile-reader-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Ffile-reader-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Ffile-reader-service/lists"}