{"id":22602680,"url":"https://github.com/wahengchang/filehelper","last_synced_at":"2026-05-04T02:33:16.737Z","repository":{"id":57235737,"uuid":"93829823","full_name":"wahengchang/filehelper","owner":"wahengchang","description":"it is a npm package that provides fs function","archived":false,"fork":false,"pushed_at":"2017-07-10T09:49:08.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T11:39:42.626Z","etag":null,"topics":["filesystem","nodejs","tool","tutorial","utils","write"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wahengchang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-09T07:09:52.000Z","updated_at":"2017-06-09T07:45:43.000Z","dependencies_parsed_at":"2022-08-23T15:50:51.520Z","dependency_job_id":null,"html_url":"https://github.com/wahengchang/filehelper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wahengchang/filehelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahengchang%2Ffilehelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahengchang%2Ffilehelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahengchang%2Ffilehelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahengchang%2Ffilehelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wahengchang","download_url":"https://codeload.github.com/wahengchang/filehelper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wahengchang%2Ffilehelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32592502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"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":["filesystem","nodejs","tool","tutorial","utils","write"],"created_at":"2024-12-08T12:42:14.848Z","updated_at":"2026-05-04T02:33:16.701Z","avatar_url":"https://github.com/wahengchang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filehelper\n\nit is a npm package that provides fs function, with file existed check before file write.\n\n[![NPM](https://nodei.co/npm/filehelper.png?downloads=true\u0026downloadRank=true)](https://www.npmjs.com/package/filehelper)\n\n\n## Install\n\n```\n$ npm install --save filehelper\n```\n\n## Usage\n\n#### Writing a file:\n\n - replace the old one, while the file is existed\n - create new one, while the file is not existed\n\n```js\nvar filehelper = require(\"filehelper\")\n\nvar str = ' I love Peter 3';\n\nfilehelper.write('./data.json', str)\n    .then( res=\u003e {console.log('file is created');})\n    \n```\n\n\n#### Read a file:\n\n```js\nvar filehelper = require(\"filehelper\")\n\nfilehelper.read('./data.json')\n    .then( res=\u003e {console.log(res)})\n    \n```\n\n\n\n## License\n\nMIT © [Waheng Chang](http://github.com/wahengchang)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahengchang%2Ffilehelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwahengchang%2Ffilehelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwahengchang%2Ffilehelper/lists"}