{"id":25505249,"url":"https://github.com/errilaz/toptions","last_synced_at":"2025-09-04T10:45:50.516Z","repository":{"id":64615163,"uuid":"576982300","full_name":"errilaz/toptions","owner":"errilaz","description":"Options parsing \u0026 that's all.","archived":false,"fork":false,"pushed_at":"2023-06-12T15:51:18.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T08:57:38.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/errilaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-12-11T16:03:11.000Z","updated_at":"2022-12-11T16:04:58.000Z","dependencies_parsed_at":"2025-05-20T02:32:02.251Z","dependency_job_id":null,"html_url":"https://github.com/errilaz/toptions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/errilaz/toptions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errilaz%2Ftoptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errilaz%2Ftoptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errilaz%2Ftoptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errilaz%2Ftoptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/errilaz","download_url":"https://codeload.github.com/errilaz/toptions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/errilaz%2Ftoptions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273595739,"owners_count":25134258,"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-09-04T02:00:08.968Z","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":[],"created_at":"2025-02-19T05:59:37.564Z","updated_at":"2025-09-04T10:45:49.848Z","avatar_url":"https://github.com/errilaz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toptions\n\n\u003ca href=\"https://www.npmjs.com/package/toptions\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/toptions?style=flat-square\"\u003e\u003c/a\u003e\n\n\u003e Options parsing \u0026 nothing else.\n\n## Features\n\n- Parses options\n- Optional configuration\n- TypeScript support\n- No coercion\n- No validation\n- No dependencies\n\n## Install\n\n```sh\nnpm install toptions\n# or\npnpm add toptions\n# or\nyarn add toptions\n# or\nbun add toptions\n```\n\n## Example\n\n```ts\nimport options from \"toptions\"\n\nconst parse = options({\n  // Positional option\n  path: options.arg(0),\n  // Named option (type is: string | undefined)\n  dist: options.flag(\"d\"),\n  // Named option with a default (type is: string)\n  port: options.flag(\"p\", 3000),\n  // Append multiple values to \"exclude\"\n  exclude: options.list(\"e\"),\n  // Boolean --help option\n  help: options.bit(\"h\"),\n  // Increments the \"log\" option\n  log: options.level(\"l\"),\n  // Parses everything after a --\n  nodeargs: options.raw(),\n  // Parses everything after given positional index\n  // Other options will still be parsed\n  // Useful for conditionally passing the rest of the options to another command\n  args: options.rest(0),\n})\n\nconst { path, dist, port, exclude, help, log, nodeargs, args } = parse(process.argv.slice(2))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrilaz%2Ftoptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferrilaz%2Ftoptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferrilaz%2Ftoptions/lists"}