{"id":15483245,"url":"https://github.com/simonecorsi/flaggy","last_synced_at":"2025-09-14T13:52:16.734Z","repository":{"id":36981167,"uuid":"270727052","full_name":"simonecorsi/flaggy","owner":"simonecorsi","description":"⛳️ Zero dependency command flag generator from a simple javascript object","archived":false,"fork":false,"pushed_at":"2025-09-12T03:02:12.000Z","size":6568,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-12T05:42:40.859Z","etag":null,"topics":["argv","command","flag","javascript","nodejs","npm","opt","options","parser","stringify"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/flaggy","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/simonecorsi.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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-08T15:47:49.000Z","updated_at":"2025-09-12T03:02:08.000Z","dependencies_parsed_at":"2023-10-16T16:22:47.484Z","dependency_job_id":"41bcd78b-d509-490a-ac5c-7fa611d44f6f","html_url":"https://github.com/simonecorsi/flaggy","commit_stats":{"total_commits":476,"total_committers":5,"mean_commits":95.2,"dds":"0.23739495798319332","last_synced_commit":"350e344c1585a807c29081e6285d6abda301e9cb"},"previous_names":["kirkhammetz/flaggy"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/simonecorsi/flaggy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fflaggy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fflaggy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fflaggy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fflaggy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonecorsi","download_url":"https://codeload.github.com/simonecorsi/flaggy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonecorsi%2Fflaggy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275114819,"owners_count":25407928,"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-14T02:00:10.474Z","response_time":75,"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":["argv","command","flag","javascript","nodejs","npm","opt","options","parser","stringify"],"created_at":"2024-10-02T05:11:08.442Z","updated_at":"2025-09-14T13:52:16.707Z","avatar_url":"https://github.com/simonecorsi.png","language":"JavaScript","readme":"# flaggy\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\n![tests](https://github.com/simonecorsi/flaggy/workflows/test/badge.svg)\n\n## About\n\nThis packages aim is to simplify programmatically generate flags to use in Unix-style command by declaring them with an object literal and turning them into an array or a string of usable flags.\n\n**Why?**\n\n- You exec commands and need to provide options easily;\n- You want to avoid string concatenation to test easily;\n- you don't want to have an headache refactoring when needed.\n\n## Table of contents\n\n\u003c!-- toc --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Arguments](#arguments)\n  - [Output sample](#output-sample)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n- [Acknowledgements](#acknowledgements)\n\n\u003c!-- tocstop --\u003e\n\n## Installation\n\nYou can install locally\n\n```sh\nnpm i flaggy\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n```js\nconst flaggy = require(\"flaggy\");\nflaggy({ d: true, path: \"/some/path\", verbose: true }); // [\"--path\", \"/some/path\", \"--verbose\", \"-d\"]\nflaggy({ d: true, path: \"/some/path\", verbose: true }, true); // \"--path /some/path --verbose\" -d\n```\n\n### Arguments\n\n| parameter | type    | description                                                                 | default |\n| --------- | ------- | --------------------------------------------------------------------------- | ------- |\n| [0]       | Object  | Object with the value to stringify as flags                                 | null    |\n| [1]       | Boolean | Stringify result? if false returns argv array else return stringified flags | false   |\n\n### Output sample\n\n```js\nconst fstring = flaggy(\n  {\n    t: true,\n    number: 1,\n    boolean: true,\n    s: \"short\",\n    string: \"hi\",\n    iCantGetWhy: \"This is so long\",\n    weHaveListToo: [\"one\", \"long value\"],\n  },\n  true\n);\n// -t --number 1 --boolean -s short --string hi --i-cant-get-why=\"This is so long\" --we-have-list-too one --we-have-list-too=\"long value\"\n```\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nProject is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.\n\nThis projects uses [commitizen](https://github.com/commitizen/cz-cli) so be sure to use standard commit format or PR won't be accepted\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat(scope): some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nSimone Corsi - [@im_simonecorsi](https://twitter.com/im_simonecorsi)\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n\n## Acknowledgements\n\n- [malcommac](https://github.com/malcommac) - for inspiration after seeing his string concatenations\n- [jonschlinkert](https://github.com/jonschlinkert) - for his [dashify](https://github.com/jonschlinkert/dashify) function\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fflaggy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonecorsi%2Fflaggy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonecorsi%2Fflaggy/lists"}