{"id":27066322,"url":"https://github.com/cenobitedk/rcload","last_synced_at":"2026-05-03T23:35:50.797Z","repository":{"id":70078912,"uuid":"233832834","full_name":"cenobitedk/rcload","owner":"cenobitedk","description":"Find and load json configuration from a package.json property, rc file, or CommonJS module","archived":false,"fork":false,"pushed_at":"2020-01-15T10:15:46.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T22:23:11.148Z","etag":null,"topics":["config","json","node","nodejs","rc"],"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/cenobitedk.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}},"created_at":"2020-01-14T12:07:33.000Z","updated_at":"2020-01-14T13:49:04.000Z","dependencies_parsed_at":"2023-07-14T20:45:15.313Z","dependency_job_id":null,"html_url":"https://github.com/cenobitedk/rcload","commit_stats":null,"previous_names":["cenobitedk/rcconfig"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cenobitedk/rcload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cenobitedk%2Frcload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cenobitedk%2Frcload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cenobitedk%2Frcload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cenobitedk%2Frcload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cenobitedk","download_url":"https://codeload.github.com/cenobitedk/rcload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cenobitedk%2Frcload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["config","json","node","nodejs","rc"],"created_at":"2025-04-05T18:50:14.817Z","updated_at":"2026-05-03T23:35:50.774Z","avatar_url":"https://github.com/cenobitedk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rcload\n\nFind and load json configuration from a package.json property, rc file, or CommonJS module.\n\nHeavily inspired by [cosmiconfig](https://www.npmjs.com/package/cosmiconfig), but super simplified for minimal bundlesize.  \nThe big difference from cosmiconfig is that **rcload does not support yaml files**.\n\n**rcload** will search for the following:\n\n- a `package.json` property\n- a JSON extensionless \"rc file\"\n- an \"rc file\" with the extensions `.json` or `.js`\n- a `.config.js` CommonJS module\n\nIt is also meant as a partial drop-in replacement which means it return a `result` object same as cosmiconfig.\n\n## Differences from [cosmiconfig](https://www.npmjs.com/package/cosmiconfig)\n\n- Supports only JSON and CommonJS formats.\n- Only looks in `process.cwd()`.\n- Limited options.\n- Only synchronous load.\n\n## Usage\n\nInstall as a dependency.\n\n```\nnpm i rcload\n```\n\nUse in your application.\n\n```\nconst rcload = require('rcload');\n\nconst result = rcload('myapp');\n```\n\n## Result\n\nThe result object has the following properties:\n\n- `config`: The parsed configuration object. `undefined` if the file is empty.\n- `filepath`: The path to the configuration file that was found.\n- `isEmpty`: true if the configuration file is empty.\n\nIn contrast to cosmiconfig, `isEmpty` will remain in the result object when the config is found, e.g.:\n\n```\nconst result = rcload('myapp');\n// {\n//     config: {\n//         ...\n//     },\n//     filepath: \"/users/johndoe/www/myapp/.myapprc\",\n//     isEmpty: false\n// }\n```\n\n## Options\n\n**rcload** takes an options object:\n\n- `cwd`: the full directory path to search in. Common for `package.json` and rc files. Defaults to `process.cwd()`.\n\nIf you want your config files in another directory this will help, e.g.:\n\n```\nrcload('myapp', {\n    cwd: path.join(process.cwd(), 'configs')\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcenobitedk%2Frcload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcenobitedk%2Frcload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcenobitedk%2Frcload/lists"}