{"id":23377950,"url":"https://github.com/beyondjs/finder","last_synced_at":"2025-04-10T19:51:14.649Z","repository":{"id":64057365,"uuid":"572995725","full_name":"beyondjs/finder","owner":"beyondjs","description":"A versatile file finder and watcher utility for Node.js applications. This package provides powerful tools for searching, filtering, and monitoring files and directories, including support for configurable finders and collections. Ideal for projects requiring advanced file management and real-time file system monitoring capabilities.","archived":false,"fork":false,"pushed_at":"2024-12-31T11:32:38.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T17:49:27.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/beyondjs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-01T13:31:48.000Z","updated_at":"2024-12-31T10:05:41.000Z","dependencies_parsed_at":"2024-09-14T10:21:26.208Z","dependency_job_id":"3bd73572-bbfc-497d-859f-6b0e463b656d","html_url":"https://github.com/beyondjs/finder","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"55f35bb909303f9c805422afbbc4ba5496f0b4c2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Ffinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Ffinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Ffinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Ffinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/finder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283440,"owners_count":21077845,"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-12-21T18:33:33.823Z","updated_at":"2025-04-10T19:51:14.629Z","avatar_url":"https://github.com/beyondjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beyond-js/finder\n\nA powerful and flexible file finder utility for Node.js applications.\n\n## Installation\n\n```bash\nnpm install @beyond-js/finder\n```\n\n## Usage\n\n```javascript\nconst { Finder, ConfigurableFinder, FinderCollection } = require('@beyond-js/finder');\n\n// Basic usage with Finder\nconst finder = new Finder('/path/to/search', {\n\tincludes: ['*.js', 'src/**/*.ts'],\n\texcludes: ['node_modules', 'dist'],\n\tfilename: 'config',\n\textname: ['.json', '.yaml']\n});\n\nfinder.on('file.change', file =\u003e {\n\tconsole.log('File changed:', file);\n});\n\n// Using ConfigurableFinder\nconst configurableFinder = new ConfigurableFinder(watcherInstance);\nconfigurableFinder.configure('/path/to/search', {\n\tincludes: ['**/*.js'],\n\texcludes: ['node_modules']\n});\n\n// Using FinderCollection\nclass MyCollection extends FinderCollection {\n\tconstructor(watcher) {\n\t\tsuper(watcher, MyItemClass);\n\t}\n}\n\nconst collection = new MyCollection(watcherInstance);\ncollection.configure('/path/to/search', {\n\tincludes: ['**/*.config.js']\n});\n\ncollection.ready.then(() =\u003e {\n\tfor (const [key, item] of collection) {\n\t\tconsole.log(key, item);\n\t}\n});\n```\n\n## API\n\n### Finder\n\n-   `constructor(path: string, specs: object)`\n-   `on(event: string, callback: function)`: Listen for file changes\n\n### ConfigurableFinder\n\n-   `constructor(watcher: object)`\n-   `configure(path: string, specs: object)`: Set up the finder configuration\n\n### FinderCollection\n\n-   `constructor(watcher: object, Item: class)`\n-   `configure(path: string, specs: object)`: Set up the collection configuration\n-   `ready`: Promise that resolves when the collection is ready\n\n## Features\n\n-   Flexible file searching with include/exclude patterns\n-   File watching capabilities\n-   Configurable finder for dynamic search configurations\n-   Collection support for managing groups of found items\n-   Asynchronous processing with Promise support\n\n## License\n\nMIT © [[BeyondJS](https://beyondjs)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Ffinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Ffinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Ffinder/lists"}