{"id":15743684,"url":"https://github.com/doowb/fs-read-queue","last_synced_at":"2025-03-13T10:30:47.859Z","repository":{"id":34418378,"uuid":"38350135","full_name":"doowb/fs-read-queue","owner":"doowb","description":"Queue `fs.readFile` calls to the same file path.","archived":false,"fork":false,"pushed_at":"2015-10-16T02:59:24.000Z","size":140,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T03:59:48.882Z","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":"gnea/grbl-Mega","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.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-07-01T04:46:01.000Z","updated_at":"2021-04-12T22:08:01.000Z","dependencies_parsed_at":"2022-09-07T22:01:25.518Z","dependency_job_id":null,"html_url":"https://github.com/doowb/fs-read-queue","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Ffs-read-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Ffs-read-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Ffs-read-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Ffs-read-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/fs-read-queue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221360669,"owners_count":16805034,"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-04T03:21:01.348Z","updated_at":"2024-10-24T23:21:29.840Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs-read-queue [![NPM version](https://badge.fury.io/js/fs-read-queue.svg)](http://badge.fury.io/js/fs-read-queue)  [![Build Status](https://travis-ci.org/doowb/fs-read-queue.svg)](https://travis-ci.org/doowb/fs-read-queue)\n\n\u003e Queue `fs.readFile` calls to the same file path.\n\n\u003e The code in this module is inspired by the work done by [mhiguera](https://github.com/mhiguera) in [this pull request](https://github.com/tj/consolidate.js/pull/171).\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i fs-read-queue --save\n```\n\n## Usage\n\n```js\nvar readFile = require('fs-read-queue');\n```\n\n## API\n\n\u003c!-- add a path or glob pattern for files with code comments to use for docs  --\u003e\n\n### [readFile](index.js#L35)\n\nFile reading function that will queue up calls to `fs.readFile` for the same filepath to prevent `ENFILE` errors.\n\n**Params**\n\n* `fp` **{String}**: File path to read\n* `options` **{String}**: Additional options to pass to `  fs.readFile`\n* `cb` **{Function}**: Callback function that takes `err` and `contents` parameters. Will be called when the file is read.\n\n**Example**\n\n```js\nreadFile('path/to/my/file', function (err, contents) {\n  if (err) return console.error(err);\n  console.log(contents);\n});\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d \u0026\u0026 npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/fs-read-queue/issues/new)\n\n## Author\n\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2015 Brian Woodward\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 01, 2015._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Ffs-read-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Ffs-read-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Ffs-read-queue/lists"}