{"id":24383248,"url":"https://github.com/firstandthird/parse-dir","last_synced_at":"2025-04-11T01:12:11.752Z","repository":{"id":17296135,"uuid":"20066541","full_name":"firstandthird/parse-dir","owner":"firstandthird","description":"Node lib to recursively read the files in a directory and return their contents","archived":false,"fork":false,"pushed_at":"2022-04-14T03:04:46.000Z","size":139,"stargazers_count":1,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T01:12:06.782Z","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/firstandthird.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-22T15:32:24.000Z","updated_at":"2021-02-19T01:48:30.000Z","dependencies_parsed_at":"2022-08-25T10:50:15.421Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/parse-dir","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fparse-dir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fparse-dir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fparse-dir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fparse-dir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/parse-dir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322571,"owners_count":21084337,"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":"2025-01-19T10:13:59.544Z","updated_at":"2025-04-11T01:12:11.735Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"parse-dir\n[![Build Status](https://travis-ci.org/firstandthird/parse-dir.svg?branch=master)](https://travis-ci.org/firstandthird/parse-dir)\n\n=========\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/firstandthird/parse-dir.svg)](https://greenkeeper.io/)\n\nNode lib to recursively read the files in a directory and return their contents.\n\n## Installation\n\n```npm install parse-dir```\n\n## Usage\n\n```parseDir(glob, callback);```\n\nOr, if you prefer to make it synchronous:\n\n```javascript\nvar result = parseDir(glob);\nvar otherResult = parseDir.sync(otherGlob);\n```\n\n### Example\n\n```javascript\nvar parseDir = require('parse-dir');\n\nparseDir('*', function(err, files) {\n\n});\n```\n\n### Output\n\n```javascript\n[\n  {\n    fullpath: '/path/to/file.ext',\n    filename: 'file.ext',\n    basename: 'file',\n    extension: '.ext',\n    raw: 'raw contents of file',\n    contents: 'parsed contents of file',\n    parsed: true|false //if file is supported, it will parse the contents.  If false, contents == raw.  See Parsing Files.\n  }\n]\n```\n\n## Parsing Files\n\nIf `parseDir` knows how to parse a file, it will attempt to read it and turn it into a javascript object.\n\n### Supported Files\n\n* YAML\n* JSON\n* JS\n* CoffeeScript\n* Livescript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fparse-dir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fparse-dir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fparse-dir/lists"}