{"id":18595015,"url":"https://github.com/eugabrielsilva/js-include","last_synced_at":"2026-05-01T19:32:10.781Z","repository":{"id":57112191,"uuid":"428028666","full_name":"eugabrielsilva/js-include","owner":"eugabrielsilva","description":"PHP-like include library for Node.js","archived":false,"fork":false,"pushed_at":"2023-02-09T20:33:42.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T07:32:53.825Z","etag":null,"topics":["include","javascript-module","nodejs"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@eugabrielsilva/js-include","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/eugabrielsilva.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-14T20:02:59.000Z","updated_at":"2021-11-24T17:01:17.000Z","dependencies_parsed_at":"2024-12-26T20:41:59.851Z","dependency_job_id":"a3d0ba1c-8a6c-4563-87d4-125719b83bc3","html_url":"https://github.com/eugabrielsilva/js-include","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"216c4e4d95f04bdaf06c00e7079dc2fba874644a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/eugabrielsilva/js-include","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugabrielsilva%2Fjs-include","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugabrielsilva%2Fjs-include/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugabrielsilva%2Fjs-include/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugabrielsilva%2Fjs-include/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eugabrielsilva","download_url":"https://codeload.github.com/eugabrielsilva/js-include/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugabrielsilva%2Fjs-include/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32510670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["include","javascript-module","nodejs"],"created_at":"2024-11-07T01:18:04.003Z","updated_at":"2026-05-01T19:32:10.758Z","avatar_url":"https://github.com/eugabrielsilva.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-include\nThis library allows you to include, in-place, common Javascript files (not modules) into your Node.js application and evaluate their script in the global namespace, kind like PHP does.\n\n### Installation\n```\nnpm install @eugabrielsilva/js-include\n```\n\n### Usage (single file)\n```js\n// Declare the module\nconst includes = require('@eugabrielsilva/js-include');\n\n// Include the file\nincludes.__includeFile('./inc/myfile.js');\neval(includes.myfile);\n```\n\n### Usage (directory)\n```js\n// Declare the module\nconst includes = require('@eugabrielsilva/js-include');\n\n// Include the directory\nincludes.__includeDir('./inc');\n\nfor (let file in includes.inc) {\n    eval(includes.inc[file]);\n}\n```\n\n### Checking files existence\n`__includeFile()` and `__includeDir()` **do not check for files existence**.\n\nIf you want to check if a file exists before including it, and throw an error if not, use `__requireFile()` and `__requireDir()` equivalents.\n\n### Credits\nLibrary developed and currently maintained by [Gabriel Silva](https://github.com/eugabrielsilva).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugabrielsilva%2Fjs-include","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugabrielsilva%2Fjs-include","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugabrielsilva%2Fjs-include/lists"}