{"id":16644221,"url":"https://github.com/75lb/file-set","last_synced_at":"2025-10-30T12:30:37.100Z","repository":{"id":17617208,"uuid":"20421339","full_name":"75lb/file-set","owner":"75lb","description":"Expand a list of paths and glob expressions into three sets: \"files\", \"directories\" and \"not existing\".","archived":false,"fork":false,"pushed_at":"2022-01-14T21:53:19.000Z","size":236,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T12:17:12.034Z","etag":null,"topics":["glob"],"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/75lb.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}},"created_at":"2014-06-02T22:04:32.000Z","updated_at":"2023-10-01T21:50:51.000Z","dependencies_parsed_at":"2022-08-30T21:30:14.857Z","dependency_job_id":null,"html_url":"https://github.com/75lb/file-set","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/75lb%2Ffile-set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/75lb%2Ffile-set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/75lb%2Ffile-set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/75lb%2Ffile-set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/75lb","download_url":"https://codeload.github.com/75lb/file-set/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238961395,"owners_count":19559479,"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":["glob"],"created_at":"2024-10-12T08:10:49.087Z","updated_at":"2025-10-30T12:30:37.095Z","avatar_url":"https://github.com/75lb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![view on npm](https://badgen.net/npm/v/file-set)](https://www.npmjs.org/package/file-set)\n[![npm module downloads](https://badgen.net/npm/dt/file-set)](https://www.npmjs.org/package/file-set)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/file-set)](https://github.com/75lb/file-set/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/file-set)](https://github.com/75lb/file-set/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/file-set/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/file-set/actions/workflows/node.js.yml)\n\n# file-set\n\nCross-platform glob expansions simplified. Input: file paths and glob expressions. Output: resolved file paths organised by type (file, directory and not-found). It handles all the cross-platform issues associated with file paths.\n\n\nParticularly useful for handling user input, for example a CLI utility which accepts a list of file paths and globs.\n\n```\n$ example-utility index.js * not/existing/*\n```\n\nThe example-utility above could pass its user input into `FileSet`. Call `await .add(\u003cstring[]\u003e)` as many times as necessary, adding more path/glob expressions each time.\n\n```js\nimport FileSet from 'file-set'\nconst fileSet = new FileSet()\nawait fileSet.add([ 'index.js', '*', 'not/existing/*' ])\nconsole.log(fileSet)\n```\n\nThe output has been organised into sets. Any duplicates caused by overlapping glob expressions are removed.\n\n```\nFileSet {\n  files: [ 'index.js', 'LICENSE', 'package.json', 'README.md' ],\n  dirs: [ 'jsdoc2md/', 'lib/', 'node_modules/', 'test/' ],\n  notExisting: [ 'not/existing/*' ]\n}\n```\n\n* * *\n\n\u0026copy; 2014-25 [Lloyd Brookes](https://github.com/75lb) \\\u003copensource@75lb.com\\\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F75lb%2Ffile-set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F75lb%2Ffile-set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F75lb%2Ffile-set/lists"}