{"id":36540173,"url":"https://github.com/ngoylufo/filer","last_synced_at":"2026-01-12T05:44:14.099Z","repository":{"id":57130688,"uuid":"239329982","full_name":"ngoylufo/filer","owner":"ngoylufo","description":"Filer is a simple file reader/writer for node.","archived":false,"fork":false,"pushed_at":"2020-04-18T01:55:04.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T15:53:49.646Z","etag":null,"topics":["file-reader","file-writer","filer","reader","writer"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ngoylufo.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":"2020-02-09T15:49:19.000Z","updated_at":"2020-04-18T01:26:50.000Z","dependencies_parsed_at":"2022-09-01T00:12:03.178Z","dependency_job_id":null,"html_url":"https://github.com/ngoylufo/filer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ngoylufo/filer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoylufo%2Ffiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoylufo%2Ffiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoylufo%2Ffiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoylufo%2Ffiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngoylufo","download_url":"https://codeload.github.com/ngoylufo/filer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngoylufo%2Ffiler/sbom","scorecard":{"id":683368,"data":{"date":"2025-08-11","repo":{"name":"github.com/ngoylufo/filer","commit":"2d8c0b2c04e42fba4ea0a4f99f8c3736a8fe5295"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T23:55:56.627Z","repository_id":57130688,"created_at":"2025-08-21T23:55:56.627Z","updated_at":"2025-08-21T23:55:56.627Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":["file-reader","file-writer","filer","reader","writer"],"created_at":"2026-01-12T05:44:13.379Z","updated_at":"2026-01-12T05:44:14.090Z","avatar_url":"https://github.com/ngoylufo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filer\n\nFiler is a simple file reader/writer for node.\n\n## Installation\n\nIf you happened to have stumbled upon this and have some time to kill, installing filer isn't too complicated. Also I couldn't think of a different name.\n\n```sh\nnpm install @ngoylufo/filer\n```\n\n## Usage\n\nFiler only has two use cases, reading and writing to files. If want to order pizza whilst on the toilet, you've come to the wrong place.\n\n### Require filer, preferably, at the top of your file\n\n```js\nconst filer = require('@ngoylufo/filer');\n```\n\nNow you can read and write files.\n\n```js\nconst package = filer.readFileSync({ filename: `${__dirname}/package.json` });\nconsole.log(package); // \u003cBuffer ...\u003e\n\nfiler\n  .readFile({\n    filename: `${__dirname}/app/index.html`\n  })\n  .then(text =\u003e {\n    console.log(text); // \u003cBuffer ...\u003e\n  })\n  .catch(err =\u003e {\n    console.log('Something went wrong');\n  });\n\n// Returns a \u003cBuffer \u003e.\nfiler.readFileSync('sample.py');\n```\n\n### [Optional] Register some formats for default behaviour\n\n```js\n// How to deal with .json files.\nfiler.formats.register({\n  extension: '.json',\n  attributes: {\n    reader: {\n      options: { encoding: 'utf8' }\n      coerce: buffer =\u003e JSON.parse(buffer.toString())\n    },\n    writer: {\n      coerce: data =\u003e typeof data === 'string' ? data : JSON.stringify(data)\n    }\n  }\n});\n\n// Multiple formats following the same rules.\nfiler.formats.register({\n  extension: ['.html', '.css', '.txt'],\n  attributes: {\n    reader: { options: { encoding: 'utf8' } },\n    writer: { options: { encoding: 'utf8' } },\n  }\n});\n\nconst package = filer.readFileSync({ filename: `${__dirname}/package.json` });\nconsole.log(package.name); // @ngoylufo/filer\n\nfiler.writeFile({\n  filename: `${__dirname}/index.html`,\n  data: '\u003c!doctype html\u003e'\n}).then(() =\u003e {\n  console.log('Wrote to file, now reading from file...');\n  filer\n    .readFile({ filename: `${__dirname}/index.html` })\n    .then(data =\u003e {\n      console.log(data); // \u003c!doctype html\u003e\n    }).catch((contents) =\u003e {\n      // contents === undefined not an error. At least not yet.\n      console.log('Something went wrong!');\n    });\n});\n\n// Unregistered format, returns a \u003cBuffer ...\u003e, if file exists.\nfiler.readFileSync('sample.py');\n```\n\n## API\n\nComing soon...\n\n## License\n\nThis project is under the MIT License - see the [LICENSE](LICENSE) details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngoylufo%2Ffiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngoylufo%2Ffiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngoylufo%2Ffiler/lists"}