{"id":15809232,"url":"https://github.com/dimkl/ffv","last_synced_at":"2025-03-31T23:44:45.547Z","repository":{"id":35115461,"uuid":"208630949","full_name":"dimkl/ffv","owner":"dimkl","description":"File Format Validation Project","archived":false,"fork":false,"pushed_at":"2023-01-08T17:19:26.000Z","size":126,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T09:48:23.929Z","etag":null,"topics":["assertions","ffv","file-extension","file-format","file-signature","file-validation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimkl.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":"2019-09-15T17:32:47.000Z","updated_at":"2023-09-08T17:58:02.000Z","dependencies_parsed_at":"2023-01-15T14:08:49.101Z","dependency_job_id":null,"html_url":"https://github.com/dimkl/ffv","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/dimkl%2Fffv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkl%2Fffv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkl%2Fffv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimkl%2Fffv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimkl","download_url":"https://codeload.github.com/dimkl/ffv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246558113,"owners_count":20796696,"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":["assertions","ffv","file-extension","file-format","file-signature","file-validation"],"created_at":"2024-10-05T03:20:34.815Z","updated_at":"2025-03-31T23:44:45.528Z","avatar_url":"https://github.com/dimkl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to ffv 👋\u003c/h1\u003e\n\u003cp\u003e\n  \u003ca href=\"https://www.npmjs.com/package/ffv\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://img.shields.io/npm/v/ffv.svg\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/npm-%3E%3D5.5.0-blue.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D8.0.0-blue.svg\" /\u003e\n  \u003ca href=\"https://github.com/dimkl/ffv#readme\"\u003e\n    \u003cimg alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/dimkl/ffv/graphs/commit-activity\"\u003e\n    \u003cimg alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/dimkl/ffv/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" target=\"_blank\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e File format validation project is responsible to check if file contents match provided extension\n\n### 🏠 [Homepage](https://github.com/dimkl/ffv#readme)\n\n## Prerequisites\n\n- npm \u003e=5.5.0\n- node \u003e=8.0.0\n\n## Install\n\n```sh\nnpm install ffv-validator\n```\n\n## Run tests\n\n```sh\nnpm run test\n```\n\n## Example\n\n```javascript\nconst fs = require('fs');\nconst { validate } = require('ffv');\n\nconst filename = './download.jpeg';\nconst readStream = fs.createReadStream(filename, { highWaterMark: 512 });\nconst wstream = fs.createWriteStream('download-1.png');\n\nconst pass = validate('jpeg');\n\nreadStream\n  .pipe(pass)\n  .pipe(wstream)\n  .on('error', err =\u003e {\n    console.error('Pipeline failed.', err);\n  })\n  .on('close', () =\u003e {\n    console.log('Pipeline succeeded.');\n  });\n```\n\n## Resources\n\n- https://www.garykessler.net/library/file_sigs.html\n- https://www.owasp.org/index.php/OWASP_File_Format_Validation_Project\n\n## Author\n\n👤 **Dimitris Klouvas \u003cdimitris.klouvas@gmail.com\u003e**\n\n- Github: [@dimkl](https://github.com/dimkl)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/dimkl/ffv/issues).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2019 [Dimitris Klouvas \u003cdimitris.klouvas@gmail.com\u003e](https://github.com/dimkl).\u003cbr /\u003e\nThis project is [MIT](https://github.com/dimkl/ffv/blob/master/LICENSE) licensed.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimkl%2Fffv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimkl%2Fffv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimkl%2Fffv/lists"}