{"id":15694181,"url":"https://github.com/silverwind/clippie","last_synced_at":"2025-05-08T07:29:38.570Z","repository":{"id":63714737,"uuid":"570135967","full_name":"silverwind/clippie","owner":"silverwind","description":"Teeny-tiny browser clipboard copy","archived":false,"fork":false,"pushed_at":"2024-04-13T18:51:33.000Z","size":360,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T08:56:11.019Z","etag":null,"topics":["browser","clipboard","copy","image-copy","javascript"],"latest_commit_sha":null,"homepage":"","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/silverwind.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":"2022-11-24T12:20:04.000Z","updated_at":"2024-05-02T16:58:43.404Z","dependencies_parsed_at":"2023-02-14T02:01:13.289Z","dependency_job_id":"1dde2f53-8015-4497-815e-19b315ccfe69","html_url":"https://github.com/silverwind/clippie","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"1b58f523dbc6eb759a15f04665efa8b89863938c"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fclippie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fclippie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fclippie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fclippie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverwind","download_url":"https://codeload.github.com/silverwind/clippie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253020411,"owners_count":21841560,"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":["browser","clipboard","copy","image-copy","javascript"],"created_at":"2024-10-03T18:53:56.121Z","updated_at":"2025-05-08T07:29:38.549Z","avatar_url":"https://github.com/silverwind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clippie\n[![](https://img.shields.io/npm/v/clippie.svg?style=flat)](https://www.npmjs.org/package/clippie) [![](https://img.shields.io/npm/dm/clippie.svg)](https://www.npmjs.org/package/clippie) [![](https://img.shields.io/bundlephobia/minzip/clippie.svg)](https://bundlephobia.com/package/clippie) [![](https://packagephobia.com/badge?p=clippie)](https://packagephobia.com/result?p=clippie)\n\n`clippie` copies text and images to clipboard in browsers. Text copy works on both secure and insecure contexts (via fallback), image or array copy requires a secure context (https or localhost).\n\n## Usage\n\n```js\nimport {clippie} from \"clippie\";\n\n// copy text\nconst success = await clippie(\"text to copy\");\n\n// copy image\nconst success = await clippie(imageBlob);\n\n// copy image and text at once\nconst success = await clippie([imageBlob, \"image description\"]);\n```\n\nSee [index.html](./index.html) for more example.\n\n## API\n### clippie(content, [options])\n\n- `content` *String*, *Blob*, *Array[String,Blob]*: Content to copy. If an Array is passed, will construct a `ClipboardItem` with all items where only one item per `type` (`blob.type` or `text/plain` for strings) is allowed.\n- `options` *Object*\n  - `reject`: *Boolean*: Whether to reject on unexpected errors. Default: `false`.\n\nReturns `true` when all content was successfully copied, `false` when not. Will never throw unless `reject` is `true`.\n\n© [silverwind](https://github.com/silverwind), distributed under BSD licence\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fclippie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverwind%2Fclippie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fclippie/lists"}