{"id":23377949,"url":"https://github.com/beyondjs/config","last_synced_at":"2026-02-12T06:04:13.731Z","repository":{"id":64057367,"uuid":"572992707","full_name":"beyondjs/config","owner":"beyondjs","description":"A powerful and flexible configuration management library for JavaScript applications. @beyond-js/config provides dynamic processing of complex configuration objects and collections, supporting file-based configs, hierarchical structures, and real-time file watching. Ideal for large-scale projects requiring robust configuration handling.","archived":false,"fork":false,"pushed_at":"2025-01-07T13:46:29.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-20T19:37:24.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/beyondjs.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":"2022-12-01T13:24:37.000Z","updated_at":"2025-01-07T13:46:58.000Z","dependencies_parsed_at":"2024-12-19T17:24:01.923Z","dependency_job_id":"7d2144c1-efc9-405d-8682-1e67b7f53a5d","html_url":"https://github.com/beyondjs/config","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"96fc2db5e2ecb60f190f94ae9f5ed7558e964d22"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondjs%2Fconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondjs","download_url":"https://codeload.github.com/beyondjs/config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283345,"owners_count":21077825,"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-12-21T18:33:33.799Z","updated_at":"2026-02-12T06:04:13.575Z","avatar_url":"https://github.com/beyondjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @beyond-js/config\n\nA dynamic configuration processor for managing complex configuration objects and collections.\n\n## Installation\n\n```bash\nnpm install @beyond-js/config\n```\n\n## Features\n\n-   Dynamic processing of configuration objects and arrays\n-   File-based configuration support\n-   Hierarchical configuration structure\n-   Error and warning handling\n-   Watching for file changes\n\n## Usage\n\n```javascript\nconst { Config, ConfigCollection } = require('@beyond-js/config');\n\n// Create a configuration object\nconst config = new Config('/path/to/config/root', {\n\tapplications: 'array',\n\t'applications/children': 'object'\n});\n\n// Set configuration data\nconfig.data = 'config.json';\n\n// Access configuration properties\nconfig.ready.then(() =\u003e {\n\tconsole.log(config.value);\n\tconsole.log(config.errors);\n\tconsole.log(config.warnings);\n});\n\n// Create a configuration collection\nclass MyCollection extends ConfigCollection {\n\t_createItem(config) {\n\t\treturn new MyItem(config);\n\t}\n}\n\nconst collection = new MyCollection(config);\n\n// Process the collection\ncollection.ready.then(() =\u003e {\n\tconsole.log(collection.size);\n\tfor (const [key, item] of collection) {\n\t\tconsole.log(key, item);\n\t}\n});\n```\n\n## API\n\n### Config\n\n-   `constructor(rootPath, branchesSpecs)`\n-   `data`: Get/set the configuration data\n-   `value`: Get the processed configuration value\n-   `errors`: Get configuration errors\n-   `warnings`: Get configuration warnings\n-   `valid`: Check if the configuration is valid\n\n### ConfigCollection\n\n-   `constructor(config)`\n-   `config`: Get the underlying configuration object\n-   `errors`: Get collection errors\n-   `warnings`: Get collection warnings\n-   `valid`: Check if the collection is valid\n\n## License\n\nMIT © [[BeyondJS](https://beyondjs.com)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondjs%2Fconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondjs%2Fconfig/lists"}