{"id":17398455,"url":"https://github.com/vweevers/fs-read-exactly","last_synced_at":"2025-07-10T07:04:14.489Z","repository":{"id":55828355,"uuid":"76897505","full_name":"vweevers/fs-read-exactly","owner":"vweevers","description":"Read exactly n bytes of an fd or file","archived":false,"fork":false,"pushed_at":"2020-12-11T17:48:03.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T06:47:02.182Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vweevers.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":"2016-12-19T21:10:22.000Z","updated_at":"2019-05-10T02:51:50.000Z","dependencies_parsed_at":"2022-08-15T07:31:19.085Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/fs-read-exactly","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/fs-read-exactly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ffs-read-exactly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ffs-read-exactly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ffs-read-exactly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ffs-read-exactly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/fs-read-exactly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Ffs-read-exactly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263576545,"owners_count":23483121,"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-16T14:56:43.957Z","updated_at":"2025-07-10T07:04:14.462Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs-read-exactly\n\n**Read exactly n bytes of an fd or file**\n\n[![npm status](http://img.shields.io/npm/v/fs-read-exactly.svg?style=flat-square)](https://www.npmjs.org/package/fs-read-exactly) [![node](https://img.shields.io/node/v/fs-read-exactly.svg?style=flat-square)](https://www.npmjs.org/package/fs-read-exactly) [![Travis build status](https://img.shields.io/travis/vweevers/fs-read-exactly.svg?style=flat-square\u0026label=travis)](http://travis-ci.org/vweevers/fs-read-exactly) [![AppVeyor build status](https://img.shields.io/appveyor/ci/vweevers/fs-read-exactly.svg?style=flat-square\u0026label=appveyor)](https://ci.appveyor.com/project/vweevers/fs-read-exactly) [![Dependency status](https://img.shields.io/david/vweevers/fs-read-exactly.svg?style=flat-square)](https://david-dm.org/vweevers/fs-read-exactly)\n\n## example\n\n```js\nconst readExactly = require('fs-read-exactly')\n\nreadExactly('readme.md', 0, 15, function (err, chunk) {\n  console.log(err) // null\n  console.log(chunk.toString()) // '# fs-read-exact'\n})\n\nreadExactly('readme.md', 0, 1e4, function (err, chunk) {\n  console.log(err.code) // 'EOF'\n})\n```\n\n## `readExactly(mixed, pos, length, callback)`\n\nWhere `mixed` is either a filename or a file descriptor.\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install fs-read-exactly\n```\n\n## license\n\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Ffs-read-exactly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Ffs-read-exactly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Ffs-read-exactly/lists"}