{"id":20293006,"url":"https://github.com/gemini-testing/configparser","last_synced_at":"2025-10-30T10:08:12.910Z","repository":{"id":33557007,"uuid":"37203240","full_name":"gemini-testing/configparser","owner":"gemini-testing","description":"Parser for configurations","archived":false,"fork":false,"pushed_at":"2025-01-21T17:59:46.000Z","size":87,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T12:04:02.535Z","etag":null,"topics":["testplane"],"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/gemini-testing.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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-10T14:48:47.000Z","updated_at":"2024-09-04T10:42:08.000Z","dependencies_parsed_at":"2024-04-01T23:31:56.708Z","dependency_job_id":"7f7d3026-467a-480e-a5ad-af62274dc691","html_url":"https://github.com/gemini-testing/configparser","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/gemini-testing/configparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fconfigparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fconfigparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fconfigparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fconfigparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-testing","download_url":"https://codeload.github.com/gemini-testing/configparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fconfigparser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281786216,"owners_count":26561307,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"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":["testplane"],"created_at":"2024-11-14T15:20:40.062Z","updated_at":"2025-10-30T10:08:12.893Z","avatar_url":"https://github.com/gemini-testing.png","language":"JavaScript","readme":"# @gemini/configparser\n\nParser for [`testplane`](https://github.com/gemini-testing/testplane) configuration files.\n\nConfig is described with a combination of a functions:\n\n```js\nvar parser = root(section({\n    system: section({\n        parallelLimit: option({\n            parseEnv: Number,\n            parseCli: Number,\n            validate: function() {...}\n        })\n    }),\n    browsers: map(\n        section({\n            calibrate: option(...),\n            windowSize: option(...)\n        })\n    )\n})\n```\n\nThere are 4 types of values:\n\n* `option({defaultValue, parseCli, parseEnv, validate, map})` - a single scalar option.\n    - `defaultValue` - a default value to use if option is not provided\n    - `defaultValue(config, currentNode)` - a function to compute default value\n    - `parseCli(value)` - a function used to parse command-line arguments\n    - `parseEnv(value)` - a function used to parse environment variable\n    - `validate(value, config, currentNode, meta)` - a function used to validate the option value\n    - `map(value, config, currentNode, meta)` - a function used to transform the option value\n* `section({sectionName1: valueParser1, sectionName2: valueParser2, ...})` - a section of a\n  values with specified key names. Each option will parsed with appropriate parser function.\n  Any unknown value passed by user will be treated as an error.\n* `map(valueParser, defaultValue)` - a map with any number of user-specified keys. Each value is parsed by\n  `valueParser`. If set, `defaultValue` will be used in case of no user-specified data provided.\n* `root(parser, {envPrefix, cliPrefix})` - creates a root config parsers from specifed parser function. Returns function with signature `f({options, env, argv})`.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fconfigparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-testing%2Fconfigparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fconfigparser/lists"}