{"id":15698956,"url":"https://github.com/doowb/iterator-sync","last_synced_at":"2025-05-09T02:16:40.079Z","repository":{"id":33728231,"uuid":"37382529","full_name":"doowb/iterator-sync","owner":"doowb","description":"Iterate over a stack of functions.","archived":false,"fork":false,"pushed_at":"2015-10-16T03:03:57.000Z","size":552,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T03:33:00.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kaitai-io/kaitai_struct_doc","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-06-13T18:15:08.000Z","updated_at":"2021-04-12T22:07:15.000Z","dependencies_parsed_at":"2022-09-13T18:00:51.435Z","dependency_job_id":null,"html_url":"https://github.com/doowb/iterator-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fiterator-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/iterator-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251837465,"owners_count":21651762,"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-03T19:36:38.708Z","updated_at":"2025-05-09T02:16:40.057Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iterator-sync [![NPM version](https://badge.fury.io/js/iterator-sync.svg)](http://badge.fury.io/js/iterator-sync)  [![Build Status](https://travis-ci.org/doowb/iterator-sync.svg)](https://travis-ci.org/doowb/iterator-sync)\n\n\u003e Iterate over a stack of functions.\n\nThis module is intended to be used with [loader-cache](https://github.com/jonschlinkert/loader-cache)but may be used by itself or in other modules.\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i iterator-sync --save\n```\n\n## Usage\n\n```js\nvar iterator = require('iterator-sync');\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### [iterator](index.js#L20)\n\nIterate over a stack of functions passing the results of\neach function to the next function in the stack.\n\n**Params**\n\n* `stack` **{Array}**: Array of functions to call.\n* `returns` **{Function}**: Returns a function that will iterator over the given stack of functions.\n\n```js\nvar fs = require('fs');\nvar iterator = require('iterator-sync');\nvar stack = [\n  function (fp) { return fs.readFileSync(fp, 'utf8'); },\n  function (contents) { return JSON.parse(contents); }\n];\nvar readJSON = iterator(stack);\nvar pkg = readJSON('./package.json');\nconsole.log(pkg);\n```\n\n## Related projects\n\n\u003c!-- add an array of related projects, then un-escape the helper --\u003e\n\n* [iterator-async](https://github.com/doowb/iterator-async): Iterate over a stack of async functions.\n* [iterator-promise](https://github.com/doowb/iterator-promise): Iterator over a stack of functions.\n* [iterator-streams](https://github.com/doowb/iterator-streams): Iterator over a stack of functions.\n* [loader-cache](https://github.com/jonschlinkert/loader-cache): Register loader functions that dynamically read, parse or otherwise transform file contents when the name… [more](https://github.com/jonschlinkert/loader-cache)\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/iterator-sync/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](https://github.com/doowb)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 17, 2015._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fiterator-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fiterator-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fiterator-sync/lists"}