{"id":17472719,"url":"https://github.com/shinnn/empty-file","last_synced_at":"2025-03-28T08:10:49.978Z","repository":{"id":57224962,"uuid":"44957216","full_name":"shinnn/empty-file","owner":"shinnn","description":"Write an empty file asynchronously","archived":false,"fork":false,"pushed_at":"2018-12-10T15:35:09.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T23:35:11.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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":"2015-10-26T09:05:12.000Z","updated_at":"2018-12-10T15:35:11.000Z","dependencies_parsed_at":"2022-08-24T11:01:05.501Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/empty-file","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fempty-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fempty-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fempty-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Fempty-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/empty-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991582,"owners_count":20706129,"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-10-18T17:34:40.717Z","updated_at":"2025-03-28T08:10:49.956Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","readme":"# empty-file\n\n[![npm version](https://img.shields.io/npm/v/empty-file.svg)](https://www.npmjs.com/package/empty-file)\n[![Build Status](https://travis-ci.com/shinnn/empty-file.svg?branch=master)](https://travis-ci.com/shinnn/empty-file)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/empty-file.svg)](https://coveralls.io/github/shinnn/empty-file)\n\nA [Node.js](https://nodejs.org/) module to write an empty file asynchronously\n\n```javascript\nconst emptyFile = require('empty-file');\nconst {readFile} = require('fs').promises;\n\n(async () =\u003e {\n  await emptyFile('file/path');\n  (await readFile('file/path')).length; //=\u003e 0\n})();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install empty-file\n```\n\n## API\n\n```javascript\nconst emptyFile = require('empty-file');\n```\n\n### emptyFile(*path*[, *options*])\n\n*path*: `string`  \n*options*: `Object` ([`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fspromises_writefile_file_data_options) options except for `encoding`)  \nReturn: `Promise`\n\nIt writes `Buffer.alloc(0)` to a file, replacing the file if it already exists.\n\n## Related project\n\n* [empty-file-callback](https://github.com/shinnn/empty-file-callback) (callback-style version)\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fempty-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Fempty-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Fempty-file/lists"}