{"id":21126731,"url":"https://github.com/lukem512/uponatime","last_synced_at":"2025-03-14T11:43:35.943Z","repository":{"id":57387312,"uuid":"88972319","full_name":"lukem512/uponatime","owner":"lukem512","description":"[Once] upon a time. Prints 'once', 'twice' or 'n times'.","archived":false,"fork":false,"pushed_at":"2017-11-07T17:07:28.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T17:15:51.632Z","etag":null,"topics":["count","grammar","language","once","thrice","twice"],"latest_commit_sha":null,"homepage":"http://npmjs.com/package/uponatime","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/lukem512.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}},"created_at":"2017-04-21T10:23:54.000Z","updated_at":"2017-04-24T11:04:12.000Z","dependencies_parsed_at":"2022-09-07T14:50:54.665Z","dependency_job_id":null,"html_url":"https://github.com/lukem512/uponatime","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukem512%2Fuponatime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukem512%2Fuponatime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukem512%2Fuponatime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukem512%2Fuponatime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukem512","download_url":"https://codeload.github.com/lukem512/uponatime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573168,"owners_count":20312879,"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":["count","grammar","language","once","thrice","twice"],"created_at":"2024-11-20T04:45:06.654Z","updated_at":"2025-03-14T11:43:35.904Z","avatar_url":"https://github.com/lukem512.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Once] upon a time\n\n[![Build Status](https://travis-ci.org/lukem512/uponatime.svg?branch=master)](https://travis-ci.org/lukem512/uponatime)\n\nPrints 'once', 'twice' or 'n times'.\n\n## Install\n\n```\nnpm i --save uponatime\n```\n\n## Usage\n\n```js\nconst uponatime = require('uponatime');\n\nlet clicks = 0;\n\n// This will print:\n// 1. 'Clicked the button once'\n// 2. 'Clicked the button twice'\n// 3. 'Clicked the button 3 times'\n// 4. 'Clicked the button 4 times'\n// ...\nfunction buttonHandler() {\n  clicks++;\n  console.log(`Clicked the button ${uponatime(clicks)}`);\n}\n```\n\nAn `opts` object may be passed as a optional parameter.\n\nSpecifying a truthy value for `thrice` will print `thrice` rather than `3 times`. The default value for `thrice` is `false`.\n\nSpecifying a truthy value of `capitalize` will print `Once`, `Twice` and `Trhrice` with a capital letter at the beginning. Then values for `n times` are not affected. The default value for `capitalize` is `false`.\n\nA second method, `times` is also exported. This will simply print `n times` for a specified value of `n`.\n\n```js\n// This will print: '14 times'\nconsole.log(uponatime.times(14));\n```\n\n## License\n\nMIT © Luke Mitchell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukem512%2Fuponatime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukem512%2Fuponatime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukem512%2Fuponatime/lists"}