{"id":19024108,"url":"https://github.com/astrohelm/filesnitch","last_synced_at":"2026-01-22T23:48:20.833Z","repository":{"id":190665626,"uuid":"683124502","full_name":"astrohelm/filesnitch","owner":"astrohelm","description":"Astrohelm file system snitch 👁️","archived":false,"fork":false,"pushed_at":"2024-08-24T15:06:59.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T11:57:42.386Z","etag":null,"topics":["astrohelm","filesystem","fs","javascript","montoring","nodejs","snitch","watcher","zero-dependencies"],"latest_commit_sha":null,"homepage":"https://astrohelm.ru","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/astrohelm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-25T16:54:09.000Z","updated_at":"2024-08-24T15:07:02.000Z","dependencies_parsed_at":"2023-08-25T21:26:03.641Z","dependency_job_id":"73950591-9976-4ded-b9ed-d73490d78df8","html_url":"https://github.com/astrohelm/filesnitch","commit_stats":{"total_commits":46,"total_committers":1,"mean_commits":46.0,"dds":0.0,"last_synced_commit":"8991dca03d9c95d9d5aee9ef1c4a4b30be65f22a"},"previous_names":["astrohelm/astrowatch","astrohelm/filesnitch"],"tags_count":10,"template":false,"template_full_name":"astrohelm/node-workspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrohelm%2Ffilesnitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrohelm%2Ffilesnitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrohelm%2Ffilesnitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrohelm%2Ffilesnitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrohelm","download_url":"https://codeload.github.com/astrohelm/filesnitch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250430589,"owners_count":21429323,"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":["astrohelm","filesystem","fs","javascript","montoring","nodejs","snitch","watcher","zero-dependencies"],"created_at":"2024-11-08T20:34:51.964Z","updated_at":"2026-01-22T23:48:20.765Z","avatar_url":"https://github.com/astrohelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eFileSnitch - File system watcher\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n Watch specific files, directories and deeply nested directories \u003cbr/\u003e\n Deduplicate events with debounce \u003cbr/\u003e\n Filter your filesystem events \u003cbr/\u003e\n\u003c/p\u003e\n\n\u003e [!WARNING]\n\u003e\n\u003e This library does not manage rename event, you will receive two different events instead:\n\u003e\n\u003e - First event is `unlink`, with old path to the file\n\u003e - Second event is `new`, with new path to the file\n\u003e\n\u003e You can handle it on your own with handling this kind of scenarios. Also don't use this library if\n\u003e you want to manage remote repositories, try `fs.watchFile` instead.\n\n\u003ch2 align=\"center\"\u003eInstallation\u003c/h2\u003e\n\n```bash\nnpm i filesnitch --save\n```\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n```js\nconst Snitch = require('filesnitch');\nconst snitch = new Snitch({\n  timeout: 200, // Events debouncing for queue (default 1000)\n  filter: new RegExp(/[\\D\\d]+\\.ignore\\D*/), // Ignore files and directories\n  // filter: path =\u003e new RegExp(/[\\D\\d]+\\.ignore\\D*/).test(path), // (Function)\n  // filter: /[\\D\\d]+\\.ignore\\D*/, // (RegExp)\n  // filter: '/[\\D\\d]+\\.ignore\\D*/', // (string)\n  recursive: false, // Include nested directories (default: true)\n  home: process.cwd(), // Removes root path from emits, Warning: ignore will work on full paths\n});\n\nsnitch.watchSync('/home/user/Downloads').watchSync('/home/user/Documents');\nsnitch.watch('/home/user/Desktop', (event, path, details) =\u003e console.log('New File ! Desktop'));\nsnitch.on('before', events =\u003e console.log({ before: events }));\nsnitch.on('update', (path, details) =\u003e console.log({ changed: path, details }));\nsnitch.on('unlink', path =\u003e console.log({ deleted: path }));\nsnitch.on('new', path =\u003e console.log({ new: path }));\nsnitch.on('event', (event, path, details) =\u003e console.log({ event, path, details }));\nsnitch.on('after', events =\u003e console.log({ after: events }));\n```\n\n\u003ch2 align=\"center\"\u003eCopyright \u0026 contributors\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\nCopyright © 2023 \u003ca href=\"https://github.com/astrohelm/filesnitch/graphs/contributors\"\u003eAstrohelm contributors\u003c/a\u003e.\nThis library \u003ca href=\"./LICENSE\"\u003eMIT licensed\u003c/a\u003e.\u003cbr/\u003e\nAnd it is part of \u003ca href=\"https://github.com/astrohelm\"\u003eAstrohelm ecosystem\u003c/a\u003e.\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrohelm%2Ffilesnitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrohelm%2Ffilesnitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrohelm%2Ffilesnitch/lists"}