{"id":26207206,"url":"https://github.com/oelin/node-add-file","last_synced_at":"2026-04-22T00:32:53.106Z","repository":{"id":65757630,"uuid":"599026127","full_name":"oelin/node-add-file","owner":"oelin","description":"Elegantly add files to FormData objects 📋.","archived":false,"fork":false,"pushed_at":"2023-02-08T10:47:02.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T16:22:01.407Z","etag":null,"topics":["file","form","form-data","http","io"],"latest_commit_sha":null,"homepage":"https://npmjs.com/node-add-file","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/oelin.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":"2023-02-08T09:49:10.000Z","updated_at":"2023-09-13T12:17:08.000Z","dependencies_parsed_at":"2023-03-10T18:58:23.784Z","dependency_job_id":null,"html_url":"https://github.com/oelin/node-add-file","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/oelin/node-add-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oelin%2Fnode-add-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oelin%2Fnode-add-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oelin%2Fnode-add-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oelin%2Fnode-add-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oelin","download_url":"https://codeload.github.com/oelin/node-add-file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oelin%2Fnode-add-file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32115875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"ssl_error","status_checked_at":"2026-04-22T00:30:22.894Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["file","form","form-data","http","io"],"created_at":"2025-03-12T05:31:15.693Z","updated_at":"2026-04-22T00:32:53.093Z","avatar_url":"https://github.com/oelin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-add-file\n\nElegantly add files to `FormData` objects 📋.\n\n\n## Installation\n\n```sh\nnpm i node-add-file\n```\n\n\n## Usage\n\nCreate a \"file adder\".\n\n```js\nimport addFile from 'node-add-file'\n\nconst addReadme = addFile('./README.md')\n```\n\n\nUse the adder to add `README.md` to one or more `FormData` objects.\n\n```js\naddReadme(formA) // Adds README.md to formA.\n\naddReadme(formB) // Adds README.md to formB.\n\naddReadme(formA, name = 'README') // Adds README.md to formA with name `README`.\n\naddReadme(formA, name = 'README', type = 'text/markdown') // Also sets the mime type to `text/markdown`\n```\n\nThe default name is `file` and the default mime type is `text/plain`.\n\n\n## API\n\n### addFile(filename)\n\nReturns a file adder which can be used to add the file one or more `FormData` objects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foelin%2Fnode-add-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foelin%2Fnode-add-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foelin%2Fnode-add-file/lists"}