{"id":15691442,"url":"https://github.com/deiga/peep","last_synced_at":"2025-03-30T12:25:57.711Z","repository":{"id":50151641,"uuid":"20674161","full_name":"deiga/peep","owner":"deiga","description":"Peep is a smart fs.watch wrapper which is lighter and faster","archived":false,"fork":false,"pushed_at":"2021-06-02T12:40:02.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T09:16:47.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/peep","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deiga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-10T05:56:26.000Z","updated_at":"2021-06-02T12:40:03.000Z","dependencies_parsed_at":"2022-09-07T05:51:21.762Z","dependency_job_id":null,"html_url":"https://github.com/deiga/peep","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/deiga%2Fpeep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiga%2Fpeep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiga%2Fpeep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiga%2Fpeep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deiga","download_url":"https://codeload.github.com/deiga/peep/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246317345,"owners_count":20757945,"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-03T18:21:33.878Z","updated_at":"2025-03-30T12:25:57.692Z","avatar_url":"https://github.com/deiga.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Peep\n\nPeep is a smart `fs.watch` wrapper which is lighter and faster. It uses as little `fs.FSWatcher`s as possible, and can prevent duplicate watching.\n\nPeep has a better `.add()` method which can automatically detect nested structures between the current watched files and directories, and choose the best strategy to make it fast and use less resources.\n\n## Installation\n\n\tnpm install peep --save\n\t\n## Usage\n\n```js\nvar peep = require('peep')();\n\npeep\n\t.on('all', function(event, path){\n\t    console.log(event, path);\n\t})\n\t.add('test/foo.js')\n\t.add('test') // 'test' contains 'test/foo.js'\n```\n\nPeep doesn't depend on `'globule'` module. If you prefer the feature of globbing files, you could do this:\n\n```js\nvar globule = require('globule');\n\npeep.add( globule.find('test/**/*.js') );\n```\n\n## Methods\n\n#### peep.add(path[, path, ...])\n#### peep.add(paths)\n\nAdds file(s) or directories to be watched\n\n\n```js\npeep.add('test/foo.js', 'test/foo2.js');\npeep.add(['test/foo.js', 'test/foo2.js']);\n```\n\n#### peep.remove(path[, path, ...])\n#### peep.remove(paths)\n\nRemoves file(s) or directories from being watched.\n\n#### peep.remove()\nRemoves all watched files and directories.\n\n#### peep.watched()\n\n##### Returns `Array.\u003cString\u003e`\n\nThe current watched files.\n\n\n## Events\n\nWhat's coming...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiga%2Fpeep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeiga%2Fpeep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiga%2Fpeep/lists"}