{"id":19560682,"url":"https://github.com/zoubin/tree-directory","last_synced_at":"2025-09-05T10:33:00.953Z","repository":{"id":57379483,"uuid":"43825685","full_name":"zoubin/tree-directory","owner":"zoubin","description":"Print a directory structure in the tree format","archived":false,"fork":false,"pushed_at":"2016-04-11T03:30:43.000Z","size":9,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-17T03:42:40.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zoubin.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":"2015-10-07T15:31:25.000Z","updated_at":"2022-10-11T19:42:11.000Z","dependencies_parsed_at":"2022-09-02T21:21:49.538Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/tree-directory","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftree-directory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftree-directory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftree-directory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Ftree-directory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/tree-directory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231903701,"owners_count":18443560,"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-11-11T05:08:27.563Z","updated_at":"2024-12-31T23:41:35.116Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-directory\n[![version](https://img.shields.io/npm/v/tree-directory.svg)](https://www.npmjs.org/package/tree-directory)\n[![status](https://travis-ci.org/zoubin/tree-directory.svg)](https://travis-ci.org/zoubin/tree-directory)\n[![dependencies](https://david-dm.org/zoubin/tree-directory.svg)](https://david-dm.org/zoubin/tree-directory)\n[![devDependencies](https://david-dm.org/zoubin/tree-directory/dev-status.svg)](https://david-dm.org/zoubin/tree-directory#info=devDependencies)\n\nPrint a directory structure in the tree format\n\n## Example\n**Directory structure**\n\n```\nexample/src\n├── page\n│   ├── hello\n│   │   └── index.css\n│   └── world\n│       ├── index.css\n│       └── index.js\n└── vendor\n    └── index.js\n```\n\nTo print all javascript files:\n\n```javascript\nvar tree = require('tree-directory')\n\ntree(__dirname + '/src', '**/*.js').then(function (res) {\n  console.log(res)\n})\n\n```\n\n**Output**\n```\n├─ page\n│  └─ world\n│     └─ index.js\n└─ vendor\n   └─ index.js\n\n```\n\n## tree(root[, patterns])\nReturn a promise which resolves to a treeish string\nrepresenting the directory `root` (not including itself).\n\n**root**\n\nThe target directory to format.\n\nType: `String`\n\n**patterns**\n\n[Globs](https://github.com/sindresorhus/globby#patterns)\nto match the files to include.\n\nType: `String`, `Array`\n\nDefault: `**/*`\n\n## tree.sync(root[, patterns])\nJust return the treeish string.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Ftree-directory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Ftree-directory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Ftree-directory/lists"}