{"id":16326722,"url":"https://github.com/chrisyip/sagase","last_synced_at":"2025-05-14T22:12:23.837Z","repository":{"id":16285510,"uuid":"19034007","full_name":"chrisyip/sagase","owner":"chrisyip","description":"Searching files recursively.","archived":false,"fork":false,"pushed_at":"2017-09-11T13:54:37.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T22:12:22.754Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisyip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-22T15:00:58.000Z","updated_at":"2018-12-22T04:39:05.000Z","dependencies_parsed_at":"2022-09-14T12:01:00.011Z","dependency_job_id":null,"html_url":"https://github.com/chrisyip/sagase","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fsagase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fsagase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fsagase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisyip%2Fsagase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisyip","download_url":"https://codeload.github.com/chrisyip/sagase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235712,"owners_count":22036966,"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-10T23:09:23.380Z","updated_at":"2025-05-14T22:12:23.818Z","avatar_url":"https://github.com/chrisyip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sagase\n\n[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Travis CI][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url]\n\nSearching files recursively.\n\n## Usage\n\n### Command Line\n\n```bash\nnpm install -g sagase\n\nsagase path/to/search /pattern/ /exclude_pattern/\n\nsagase -i path/to/search /pattern/ /exclude_pattern/\n\nsagase -f path/to/search -p /pattern/ -x /exclude_pattern/\n\nsagase --help\nOptions:\n  --folder, -f                           Path to search\n  --pattern, -p                          A regexp or string for matching file\n  --exclude, -x                          A regexp or string for excluding file\n  --excludeNameOnly, --exclude-nameonly  Apply excluder on file name only\n                                                      [boolean] [default: false]\n  --recursive, -r                        Search recursively\n                                                       [boolean] [default: true]\n  --ignore-case, -i                      Ignore case  [boolean] [default: false]\n  --version                              Show version number           [boolean]\n  --help                                 Show help                     [boolean]\n```\n\n### In Node.js\n\n```bash\nnpm install --save sagase\n```\n\n```js\nconst { find } = require('sagase')\n\nfind({\n  folder: './',\n  pattern: /pattern/, // accept function, regexp or string\n  nameOnly: false,\n  exclude: /pattern/, // accept function, regexp or string\n  excludeNameOnly: false,\n  recursive: true\n})\n  .then(files =\u003e {})\n\n// `pattern` and `exclude` accept [Function]\n// in this case, `nameOnly` and `excludeNameOnly` will be ignored\nfind({\n  folder: './',\n  pattern (name, path) {\n    return true // to mark as matched\n  },\n  exclude (name, path) {\n    return true // to mark as excluded\n  }\n})\n  .then(files =\u003e {})\n\n// Synchronous `find`\nconst { findSync } = require('sagase')\nconst files = findSync(options)\n```\n\n### Available Options\n\n`-f`, `--folder`: Path to search.\n\n`-p`, `--pattern`: A regexp or string for matching file.\n\n`--name-only`: Only apply `pattern` on **filename**.\n\n`-x`, `--exclude`: A regexp or string for excluding file.\n\n`--exclude-nameonly`: Only apply `exclude` on **filename**.\n\n`-i`, `--ignore-case`: Should ignore case.\n\n`-r`, `--recursive`: Search recursively.\n\n## License\n\nLicensed under the MIT license.\n\n[npm-url]: https://npmjs.org/package/sagase\n[npm-image]: http://img.shields.io/npm/v/sagase.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/chrisyip/sagase\n[daviddm-image]: http://img.shields.io/david/chrisyip/sagase.svg?style=flat-square\n[travis-url]: https://travis-ci.org/chrisyip/sagase\n[travis-image]: http://img.shields.io/travis/chrisyip/sagase.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/chrisyip/sagase\n[codecov-image]: https://img.shields.io/codecov/c/github/chrisyip/sagase.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fsagase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisyip%2Fsagase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisyip%2Fsagase/lists"}