{"id":17736700,"url":"https://github.com/parro-it/include-folder","last_synced_at":"2025-05-06T20:41:39.629Z","repository":{"id":12324004,"uuid":"14960878","full_name":"parro-it/include-folder","owner":"parro-it","description":"expose the content of each file in a folder as an object property ","archived":false,"fork":false,"pushed_at":"2020-10-02T12:59:56.000Z","size":28,"stargazers_count":18,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-08T22:35:10.013Z","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/parro-it.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":"2013-12-05T17:34:05.000Z","updated_at":"2023-03-17T23:28:44.000Z","dependencies_parsed_at":"2022-09-04T13:01:37.885Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/include-folder","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Finclude-folder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Finclude-folder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Finclude-folder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Finclude-folder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/include-folder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252768263,"owners_count":21801366,"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-26T00:24:07.421Z","updated_at":"2025-05-06T20:41:39.593Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","readme":"# include-folder\n[![Build Status](https://secure.travis-ci.org/parro-it/include-folder.png?branch=master)](http://travis-ci.org/parro-it/include-folder)  [![Npm module](https://badge.fury.io/js/include-folder.png)](https://npmjs.org/package/include-folder) [![Code Climate](https://codeclimate.com/github/parro-it/include-folder/badges/gpa.svg)](https://codeclimate.com/github/parro-it/include-folder)\n\nExpose the content of each file in a folder as an object property.\n\nThis module is browserifiable using the [folderify transform](https://github.com/parro-it/folderify)\n\n\n## Getting Started\nInstall the module with: `npm install include-folder --save`\n\nThen use like this:\n\n```javascript\nvar includeFolder = require('include-folder'),\n    folder = includeFolder(\"./aFolder\");\n```\n\nSupposing that the content of aFolder was the same as in [the sample in test](https://github.com/parro-it/include-folder/tree/master/test/files)\nfolder var will contains:\n\n```javascript\n{\n    file3OtherFile: 'this is file3OtherContent content',\n    file1: 'this is file1 content',\n    file1_1: 'this is file1_1 content'\n}\n```\n\n## Filter included files\n\nYou can filter which files to include using the filter parameter:\n\n\n```javascript\nvar includeFolder = require('include-folder'),\n    folder = includeFolder(\"./aFolder\",/^a.*/);\n```\n\nThis only include files that start with 'a'\n\nFilter parameters defaults to /^[^.].*$/, which include every file\nin the folder, except hidden ones (these that has a name starting with dot).\n\n## Preserve filenames\n\nTo prevent normalization and stripping of the extension in the result object, the `preserveFilenames` option can be used:\n\n```javascript\nincludeFolder('./www', null, { preserveFilenames: true });\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\nAdd unit tests for any new or changed functionality.\n\n\n## License\n\nCopyright (c) 2013 Andrea Parodi\n\nLicensed under the MIT license.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Finclude-folder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Finclude-folder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Finclude-folder/lists"}