{"id":22452636,"url":"https://github.com/totaltechgeek/plural-squirrel","last_synced_at":"2025-03-27T12:42:30.016Z","repository":{"id":148359091,"uuid":"547342626","full_name":"TotalTechGeek/plural-squirrel","owner":"TotalTechGeek","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-29T19:00:51.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T17:13:46.799Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TotalTechGeek.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-10-07T14:22:27.000Z","updated_at":"2022-10-07T14:22:34.000Z","dependencies_parsed_at":"2023-05-19T21:00:16.059Z","dependency_job_id":null,"html_url":"https://github.com/TotalTechGeek/plural-squirrel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalTechGeek%2Fplural-squirrel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalTechGeek%2Fplural-squirrel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalTechGeek%2Fplural-squirrel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TotalTechGeek%2Fplural-squirrel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TotalTechGeek","download_url":"https://codeload.github.com/TotalTechGeek/plural-squirrel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245850155,"owners_count":20682632,"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-06T06:11:56.350Z","updated_at":"2025-03-27T12:42:29.989Z","avatar_url":"https://github.com/TotalTechGeek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plural Squirrel\n\n[![Coverage Status](https://coveralls.io/repos/github/TotalTechGeek/plural-squirrel/badge.svg?branch=master)](https://coveralls.io/github/TotalTechGeek/plural-squirrel?branch=master)\n\nLooking for a simple library to handle your pluralization? \n\nPlural Squirrel allows you to write simple templates to handle plural text.\n\nBy using `[single|plural|zero]` syntax, you are able to easily simply distinguish how you'd like your string to be formatted for different inputs.  \n\n```js\nconst dogs = plural`The dog[|s] [is|are] hungry.`\n\nconsole.log(dogs(1)) // The dog is hungry.\nconsole.log(dogs(5)) // The dogs are hungry.\n```\n\n\nYou may wish to use additional arguments with your function, or output the number of items. `[#]` will insert the number of items, and `[0]` will refer to the first additional argument passed in. \n\n```js\nconst bananas = plural`[0] has eaten [#] banana[|s].`\n\nconsole.log(bananas(1, 'Josh')) // Josh has eaten 1 banana.\nconsole.log(bananas(2, 'Steve')) // Steve has eaten 2 bananas.\n```\n\n\nYou may use the `#` symbol the `[single|plural]` syntax as well. \n\n\n```js\nconst bananas = plural`[0] has eaten [a|#] banana[|s].`\n\nconsole.log(bananas(1, 'Josh')) // Josh has eaten a banana.\nconsole.log(bananas(2, 'Steve')) // Steve has eaten 2 bananas.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotaltechgeek%2Fplural-squirrel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotaltechgeek%2Fplural-squirrel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotaltechgeek%2Fplural-squirrel/lists"}