{"id":20896230,"url":"https://github.com/waitingsong/node-rxwalker","last_synced_at":"2026-02-05T13:31:56.460Z","repository":{"id":70044926,"uuid":"140154807","full_name":"waitingsong/node-rxwalker","owner":"waitingsong","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-16T11:09:35.000Z","size":544,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T14:24:27.188Z","etag":null,"topics":["fs","readdir","rxjs","walker"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/waitingsong.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2018-07-08T09:36:35.000Z","updated_at":"2022-06-30T01:31:09.000Z","dependencies_parsed_at":"2024-03-16T11:47:39.879Z","dependency_job_id":"87cd8c0d-66a8-4893-b86f-4cd241e4e8a5","html_url":"https://github.com/waitingsong/node-rxwalker","commit_stats":{"total_commits":478,"total_committers":2,"mean_commits":239.0,"dds":"0.014644351464435101","last_synced_commit":"57c5696e1c2091b5654905f582f556fc97a39d52"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/waitingsong/node-rxwalker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitingsong%2Fnode-rxwalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitingsong%2Fnode-rxwalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitingsong%2Fnode-rxwalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitingsong%2Fnode-rxwalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waitingsong","download_url":"https://codeload.github.com/waitingsong/node-rxwalker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitingsong%2Fnode-rxwalker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29122609,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T10:47:47.471Z","status":"ssl_error","status_checked_at":"2026-02-05T10:45:08.119Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fs","readdir","rxjs","walker"],"created_at":"2024-11-18T10:34:24.833Z","updated_at":"2026-02-05T13:31:56.444Z","avatar_url":"https://github.com/waitingsong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [rxwalker](https://waitingsong.github.io/node-rxwalker/)\n\nA reactive nodejs directory walker. More flexible control via filename and recursive depth.\n\n[![Version](https://img.shields.io/npm/v/rxwalker.svg)](https://www.npmjs.com/package/rxwalker)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![](https://img.shields.io/badge/lang-TypeScript-blue.svg)]()\n[![ci](https://github.com/waitingsong/node-rxwalker/workflows/ci/badge.svg)](https://github.com/waitingsong/node-rxwalker/actions?query=workflow%3A%22ci%22)\n[![Build status](https://ci.appveyor.com/api/projects/status/jt1a2bo4jk6b9728/branch/master?svg=true)](https://ci.appveyor.com/project/waitingsong/node-rxwalker/branch/master)\n[![codecov](https://codecov.io/gh/waitingsong/node-rxwalker/branch/master/graph/badge.svg?token=SjZLx1qd9O)](https://codecov.io/gh/waitingsong/node-rxwalker)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n\n## Installing\n```powershell\nnpm install --save rxwalker\n```\n\n## Usage\n```js\n// js\nconst walk = require('rxwalker').walk\n\nwalk('\u003cpath\u003e').subscribe(\n  data =\u003e console.info(data),\n)\n```\n\n```ts\n// es6 or typescript\nimport { walk } from 'rxwalker'\n\nwalk('\u003cpath\u003e').subscribe(\n  data =\u003e console.info(data),\n)\n```\n\n```ts\nimport { walk, EntryType } from 'rxwalker'\n\nconst maxDepth = 7 // \u003c--- walk with maxDepth\nlet dirCount = 0\nlet fileCount = 0\nlet linkCount = 0\nlet entryCount = 0\n\nwalk('\u003cpath\u003e', { maxDepth }).subscribe(\n  data =\u003e {\n    switch (data.type) {\n      case EntryType.dir:\n        console.info('got a dir', data)\n        dirCount += 1\n        entryCount += 1\n        break\n\n      case EntryType.file:\n        console.info('got a file', data)\n        fileCount += 1\n        entryCount += 1\n        break\n\n      case EntryType.link:\n        console.info('got a symbolicLink', data)\n        linkCount += 1\n        // entryCount += 1\n        break\n\n      case EntryType.noAcessPermission:\n        console.info('got a entry without access permission', data)\n        entryCount += 1\n        break\n\n      case EntryType.unknown:\n        console.info('got a unknow entry', data)\n        break\n\n      case EntryType.notExist:\n        console.error('entry not exists:', data.path)\n        break\n    }\n  },\n  err =\u003e console.error(err),\n  () =\u003e {\n    console.info(`count result dirs: ${dirCount}, files: ${fileCount}, links: ${linkCount}, entries: ${entryCount} `)\n  },\n)\n```\n\n\n```ts\nimport { walk, DirFilterCbParams, DirFilterCbRet, EntryType } from 'rxwalker'\n\nlet dirCount = 0\nlet fileCount = 0\nlet linkCount = 0\nlet entryCount = 0\n\nconst dirFilterCb = ({ files }: DirFilterCbParams): DirFilterCbRet =\u003e {\n  return files.filter(file =\u003e {\n    return file.includes('a') ? true : false  // \u003c--- filter filename/dirname\n  })\n}\n\nwalk('\u003cpath\u003e', { dirFilterCb }).subscribe(\n  data =\u003e {\n    switch (data.type) {\n      case EntryType.dir:\n        console.info('got a dir', data)\n        dirCount += 1\n        entryCount += 1\n        break\n\n      case EntryType.file:\n        console.info('got a file', data)\n        fileCount += 1\n        entryCount += 1\n        break\n\n      case EntryType.link:\n        console.info('got a symbolicLink', data)\n        linkCount += 1\n        // entryCount += 1\n        break\n\n      case EntryType.noAcessPermission:\n        console.info('got a entry without access permission', data)\n        entryCount += 1\n        break\n\n      case EntryType.unknown:\n        console.info('got a unknow entry', data)\n        break\n\n      case EntryType.notExist:\n        console.error('entry not exists:', data.path)\n        break\n    }\n\n  },\n  err =\u003e console.error(err),\n  () =\u003e {\n    console.info(`count result dirs: ${dirCount}, files: ${fileCount}, links: ${linkCount}, entries: ${entryCount} `)\n  },\n)\n```\n\n```ts\n// stop running walker conditionally\nimport { walk } from 'rxwalker'\n\nconst sub = walk('\u003cpath\u003e').subscribe(\n  data =\u003e {\n    if (data.path.includes('a')) {\n      sub.unsubscribe()\n      console.log('stopped with:', data)\n    }\n    else {\n      console.log(data)\n    }\n  }\n)\n```\n\n```ts\n// no follow symbol link\nimport { walk } from 'rxwalker'\n\nwalk('\u003cpath\u003e', { followLink: false }).subscribe(\n  data =\u003e console.log(data),\n)\n```\n\n## Demo\n- [Demos from test](https://github.com/waitingsong/node-rxwalker/blob/master/test/20_index.test.ts)\n\n\n## License\n[MIT](LICENSE)\n\n\n### Languages\n- [English](README.md)\n- [中文](README.zh-CN.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitingsong%2Fnode-rxwalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaitingsong%2Fnode-rxwalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitingsong%2Fnode-rxwalker/lists"}