{"id":22974142,"url":"https://github.com/diversen/minimist-mini","last_synced_at":"2025-04-02T07:25:07.854Z","repository":{"id":57297925,"uuid":"75480224","full_name":"diversen/minimist-mini","owner":"diversen","description":"Mini minimist with auto generation of help using README.md (converted to text) as help - and simple parsing of option given to the CLI program","archived":false,"fork":false,"pushed_at":"2024-02-07T21:15:24.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T08:05:25.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/diversen.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}},"created_at":"2016-12-03T14:58:24.000Z","updated_at":"2024-02-07T17:59:02.000Z","dependencies_parsed_at":"2024-06-21T07:11:31.840Z","dependency_job_id":"71306c46-7bd6-4c43-b7a3-532bbe3f1a49","html_url":"https://github.com/diversen/minimist-mini","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"fdbbeb44cf0157d1ac55bfc147e9d1d9fc4da434"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fminimist-mini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fminimist-mini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fminimist-mini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fminimist-mini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diversen","download_url":"https://codeload.github.com/diversen/minimist-mini/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246771744,"owners_count":20831094,"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-15T00:00:15.922Z","updated_at":"2025-04-02T07:25:07.831Z","avatar_url":"https://github.com/diversen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minimist-mini\n\nA wrapper around minimist that has some more logical methods for getting options and arguments.\n\nIt can also automatically generate documentation from\na module's `README.md` or `readme.md` file. It reads the .md file and parses it for display in\nyour console application. \n\n## Install: \n\n    npm install --save minimist-mini\n\n## Usage: \n\n```.js\n// Options are exactly as in minimist\nconst opts = [];\nopts.boolean = ['help'];\nopts.string = ['option1'];\nopts.string = ['option2'];\nopts.default = { option1: 'default value' };\nopts.alias = { h: 'help' };\n\nconst minimistMini = require('minimist-mini')(opts); \n\n// Check if help is defined, and log the value.\nvar help = minimistMini.getOption('h');\nif (help){\n    // Default help is generated from README.md or readme.md\n    // Or you may specify a file in from your package\n    console.log(minimistMini.helpMessage())\n    process.exit(0);\n}\n\n// Get single option\nconsole.log(\"value of option 'option1':\");\nconsole.log(minimistMini.getOption('option1'));\n\n// Get all options\nconsole.log(\"all options:\");\nconsole.log(minimistMini.getOptions());\n\n// Get single argument\nconsole.log(\"value of argument 0:\");\nconsole.log(minimistMini.getArgument(0));\n\n// Get all arguments\nconsole.log(\"all arguments:\");\nconsole.log(minimistMini.getArguments());\n\n```\n\n## License: \n\nMIT © [Dennis Iversen](https://github.com/diversen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fminimist-mini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiversen%2Fminimist-mini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fminimist-mini/lists"}