{"id":20073526,"url":"https://github.com/ragingwind/data-uri-to-file","last_synced_at":"2025-05-05T21:30:51.637Z","repository":{"id":139545812,"uuid":"47855605","full_name":"ragingwind/data-uri-to-file","owner":"ragingwind","description":"data-uri encoded in base64 to file or stream","archived":false,"fork":false,"pushed_at":"2017-09-05T13:17:07.000Z","size":13,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T10:54:52.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ragingwind.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":"2015-12-11T23:10:47.000Z","updated_at":"2024-02-09T06:42:52.000Z","dependencies_parsed_at":"2023-11-20T09:30:20.942Z","dependency_job_id":null,"html_url":"https://github.com/ragingwind/data-uri-to-file","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fdata-uri-to-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fdata-uri-to-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fdata-uri-to-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ragingwind%2Fdata-uri-to-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ragingwind","download_url":"https://codeload.github.com/ragingwind/data-uri-to-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252579993,"owners_count":21771248,"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":[],"created_at":"2024-11-13T14:46:38.982Z","updated_at":"2025-05-05T21:30:51.348Z","avatar_url":"https://github.com/ragingwind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-uri-to-file [![Build Status](https://travis-ci.org/ragingwind/data-uri-to-file.svg?branch=master)](https://travis-ci.org/ragingwind/data-uri-to-file)\n\n\u003e data-uri encoded in base64 to file or stream\n\n\n## Install\n\n```\n$ npm install --save data-uri-to-file\n```\n\n\n## Usage\n\n```js\nconst toFile = require('data-uri-to-file');\nconst dataUri = 'data:image/svg+xml;base64,PD94bWwgdmVy ... URPQ1RZUEUgc3ZnIFB4KPC9zdmc+Cgo=';\n\n// promise style\ntoFile(dataUri).then(file =\u003e {\n\tconsole.log(file.mimeType, file.data, file.extension);\n});\n\n// stream style\nfs.createReadStream('data-uri')\n\t.pipe(toFile.stream())\n\t.pipe(createWriteStream('file.svg'));\n```\n\n## API\n\n### toFile(input)\n\n#### input\n\nType: `string`\n\nString with data-uri encoded in base64.\n\n### toFile.stream()\n\nStream supportable interface.\n\n## License\n\nMIT © [ragingwind](http://ragingwind.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragingwind%2Fdata-uri-to-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragingwind%2Fdata-uri-to-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragingwind%2Fdata-uri-to-file/lists"}