{"id":19670406,"url":"https://github.com/mat-sz/fitool","last_synced_at":"2025-08-14T05:12:05.796Z","repository":{"id":57237559,"uuid":"243851047","full_name":"mat-sz/fitool","owner":"mat-sz","description":"📂 TypeScript file functions library.","archived":false,"fork":false,"pushed_at":"2023-08-23T16:22:57.000Z","size":89,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-09T02:54:49.750Z","etag":null,"topics":["blob","data-url","filereader","filereader-api","javascript","javascript-library","typescript","typescript-library"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mat-sz.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}},"created_at":"2020-02-28T20:42:53.000Z","updated_at":"2024-10-25T05:29:57.000Z","dependencies_parsed_at":"2025-01-10T03:33:08.546Z","dependency_job_id":"b494f81e-7f40-4b1d-a143-905625b0cee3","html_url":"https://github.com/mat-sz/fitool","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"0fc19789a354f630350cd2e298160f7d0f15dd20"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mat-sz/fitool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ffitool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ffitool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ffitool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ffitool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mat-sz","download_url":"https://codeload.github.com/mat-sz/fitool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mat-sz%2Ffitool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270364971,"owners_count":24571423,"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-08-14T02:00:10.309Z","response_time":75,"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":["blob","data-url","filereader","filereader-api","javascript","javascript-library","typescript","typescript-library"],"created_at":"2024-11-11T17:06:08.601Z","updated_at":"2025-08-14T05:12:05.754Z","avatar_url":"https://github.com/mat-sz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🔧 fitool\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nTypeScript file functions library.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"workflow\" src=\"https://img.shields.io/github/workflow/status/mat-sz/fitool/Node.js%20CI%20(yarn)\"\u003e\n\u003ca href=\"https://npmjs.com/package/fitool\"\u003e\n\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/fitool\"\u003e\n\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dw/fitool\"\u003e\n\u003cimg alt=\"NPM\" src=\"https://img.shields.io/npm/l/fitool\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cstrong\u003eQuickstart:\u003c/strong\u003e\n\u003c/p\u003e\n\n```sh\nnpm install fitool\n# or:\nyarn add fitool\n```\n\n## Table of contents\n\n1. [Examples](#examples)\n2. [Usage](#usage)\n\n## Examples\n\n### Convert `text/plain` data URL to string\n\n```js\nimport { download } from 'fitool';\n\nasync function example() {\n  const result = await toString('data:text/plain,abc');\n  // result = abc\n}\n```\n\n### Download data URL\n\n```js\nimport { download } from 'fitool';\n\nasync function example() {\n  await download('data:image/png;base64,...');\n}\n```\n\n## Usage\n\n### toFile(file: File | Blob | string | ArrayBuffer, name?: string): Promise\\\u003cFile\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to a `File`.\n\n### toBlob(file: File | Blob | string | ArrayBuffer): Promise\\\u003cBlob\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to a `Blob`.\n\n### toDataURL(file: File | Blob | string | ArrayBuffer): Promise\\\u003cstring\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to a data URL.\n\n### toBlobURL(file: File | Blob | string | ArrayBuffer): Promise\\\u003cstring\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to a blob URL.\n\n### toArrayBuffer(file: File | Blob | string | ArrayBuffer): Promise\\\u003cArrayBuffer\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to an `ArrayBuffer`.\n\n### toString(file: File | Blob | string | ArrayBuffer): Promise\\\u003cstring\\\u003e\n\nConverts a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string to an UTF-8 string.\n\n### download(file: File | Blob | string | ArrayBuffer, name: string): Promise\\\u003cvoid\\\u003e\n\nInitiates a download for a given `File`, `Blob`, `ArrayBuffer`, data URL, blob URL or string.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2Ffitool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmat-sz%2Ffitool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmat-sz%2Ffitool/lists"}