{"id":20391091,"url":"https://github.com/compactjs/clipboard","last_synced_at":"2025-03-05T00:14:40.043Z","repository":{"id":38175209,"uuid":"253856745","full_name":"CompactJS/clipboard","owner":"CompactJS","description":"Copy to clipboard.","archived":false,"fork":false,"pushed_at":"2023-03-04T10:50:38.000Z","size":1609,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T02:34:25.569Z","etag":null,"topics":["clipboard","copy","javascript"],"latest_commit_sha":null,"homepage":"https://compactjs.github.io/clipboard/","language":"HTML","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/CompactJS.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}},"created_at":"2020-04-07T16:53:04.000Z","updated_at":"2021-04-19T14:33:10.000Z","dependencies_parsed_at":"2024-11-15T03:28:48.668Z","dependency_job_id":"e24c444c-e8ef-4feb-8993-c107f084f6b2","html_url":"https://github.com/CompactJS/clipboard","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.5625,"last_synced_commit":"3c55f4d0fe4212527f91c989b9632605607e6108"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Fclipboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Fclipboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Fclipboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CompactJS%2Fclipboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CompactJS","download_url":"https://codeload.github.com/CompactJS/clipboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940579,"owners_count":20045883,"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":["clipboard","copy","javascript"],"created_at":"2024-11-15T03:28:43.049Z","updated_at":"2025-03-05T00:14:40.011Z","avatar_url":"https://github.com/CompactJS.png","language":"HTML","readme":"\u003ch1 align=\"center\"\u003e@compactjs/clipboard\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003eCopy to clipboard.\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@compactjs/clipboard\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://img.shields.io/npm/v/@compactjs/clipboard.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/CompactJS/clipboard/blob/main/LICENSE\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/github/license/CompactJS/clipboard\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  ·\n  \u003ca href=\"https://github.com/CompactJS/clipboard#readme\"\u003eHomepage\u003c/a\u003e\n  ·\n  \u003ca href=\"https://compactjs.github.io/clipboard\"\u003eView Demo\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/CompactJS/clipboard/issues\"\u003eReport Bug / Request Feature\u003c/a\u003e\n  ·\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Installation](#Install)\n- [Usage](#usage)\n- [Test](#run-tests)\n- [Contact](#contact)\n- [Contributing](#Contributing)\n- [License](#license)\n\n## Install\n\n### NPM:\n\n```sh\nnpm install @compactjs/clipboard\n```\n\n### CDN:\n\n```html\n\u003cscript src=\"https://unpkg.com/@compactjs/clipboard/dist/index.umd.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n### As module:\n\n```javascript\nimport { clipboard } from '@compactjs/clipboard';\n```\n\nAPI:\n\n```typescript\n/**\n * Copy text to clipboard.\n * @param input Either text to copy or HTMLElement to copy from\n */\nfunction clipboard(\n  input: string | HTMLTextAreaElement | HTMLInputElement\n): void;\n```\n\n**Note:** A copy to clipboard need to be triggered by user action, like a button press!\n\n### Example:\n\n```javascript\ndocument\n  .getElementById('copy-string')\n  .addEventListener('click', () =\u003e\n    clipboard('This text is going to be copied.')\n  );\n```\n\nHave a look at the [example](https://github.com/CompactJS/clipboard/blob/main/example/index.html).\n\nOr checkout the [demo](https://compactjs.github.io/clipboard).\n\n## Run tests\n\n```sh\nnpm run test\n```\n\n## Contact\n\n👤 **Timo Bechtel**\n\n- Website: https://timobechtel.com\n- Twitter: [@TimoBechtel](https://twitter.com/TimoBechtel)\n- GitHub: [@TimoBechtel](https://github.com/TimoBechtel)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003e\n\n1. Check [issues](https://github.com/CompactJS/clipboard/issues)\n1. Fork the Project\n1. Create your Feature Branch (`git checkout -b feat/AmazingFeature`)\n1. Test your changes `npm run test`\n1. Commit your Changes (`git commit -m 'feat: add amazingFeature'`)\n1. Push to the Branch (`git push origin feat/AmazingFeature`)\n1. Open a Pull Request\n\n### Commit messages\n\nThis project uses semantic-release for automated release versions. So commits in this project follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) guidelines. I recommend using [commitizen](https://github.com/commitizen/cz-cli) for automated commit messages.\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nDistributed under the [MIT](https://github.com/CompactJS/clipboard/blob/main/LICENSE) License.\n\n---\n\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompactjs%2Fclipboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompactjs%2Fclipboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompactjs%2Fclipboard/lists"}