{"id":15679769,"url":"https://github.com/jonschlinkert/make-iterator","last_synced_at":"2025-04-30T16:07:41.056Z","repository":{"id":21342450,"uuid":"24659436","full_name":"jonschlinkert/make-iterator","owner":"jonschlinkert","description":"Convert an argument into a valid iterator. Based on the `.makeIterator()` implementation in mout https://github.com/mout/mout.","archived":false,"fork":false,"pushed_at":"2018-04-08T14:18:45.000Z","size":21,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T00:45:35.972Z","etag":null,"topics":["callback","iterate","iteratee","iterator","loop","map","reduce"],"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/jonschlinkert.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":"2014-09-30T23:30:00.000Z","updated_at":"2024-08-25T20:59:23.000Z","dependencies_parsed_at":"2022-08-20T23:01:01.567Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/make-iterator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmake-iterator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmake-iterator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmake-iterator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fmake-iterator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/make-iterator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251738985,"owners_count":21635891,"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":["callback","iterate","iteratee","iterator","loop","map","reduce"],"created_at":"2024-10-03T16:35:51.754Z","updated_at":"2025-04-30T16:07:41.011Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# make-iterator [![NPM version](https://img.shields.io/npm/v/make-iterator.svg?style=flat)](https://www.npmjs.com/package/make-iterator) [![NPM monthly downloads](https://img.shields.io/npm/dm/make-iterator.svg?style=flat)](https://npmjs.org/package/make-iterator) [![NPM total downloads](https://img.shields.io/npm/dt/make-iterator.svg?style=flat)](https://npmjs.org/package/make-iterator) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/make-iterator.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/make-iterator)\n\n\u003e Convert an argument into a valid iterator. Based on the `.makeIterator()` implementation in mout https://github.com/mout/mout.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save make-iterator\n```\n\nAlthough the code has materially changed, this was originally based on the\nmake iterator function in moutjs, and externalized to a module. Thanks to the\nmoutjs team for the inspiration.\n\nCopyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com)\n\n## Usage\n\n```js\nvar iterator = require('make-iterator');\n```\n\n**Regex**\n\n```js\nvar arr = ['a', 'b', 'c', 'd', 'e', 'f'];\nvar fn = iterator(/[a-c]/);\nconsole.log(arr.filter(fn));\n//=\u003e ['a', 'b', 'c'];\n```\n\n**Objects**\n\n```js\nvar fn =  iterator({ a: 1, b: { c: 2 } });\n\nconsole.log(fn({ a: 1, b: { c: 2, d: 3 } }));\n//=\u003e true\nconsole.log(fn({ a: 1, b: { c: 3 } }));\n//=\u003e false\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [breakdance](https://www.npmjs.com/package/breakdance): Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy… [more](http://breakdance.io) | [homepage](http://breakdance.io \"Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.\")\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch \"Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.\")\n* [snapdragon](https://www.npmjs.com/package/snapdragon): Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map… [more](https://github.com/here-be/snapdragon) | [homepage](https://github.com/here-be/snapdragon \"Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 08, 2018._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmake-iterator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fmake-iterator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fmake-iterator/lists"}