clippie
Advanced tools
Comparing version 4.0.7 to 4.1.0
{ | ||
"name": "clippie", | ||
"version": "4.0.7", | ||
"version": "4.1.0", | ||
"description": "Teeny-tiny browser clipboard copy", | ||
@@ -9,16 +9,24 @@ "author": "silverwind", | ||
"type": "module", | ||
"exports": "./index.js", | ||
"sideEffects": false, | ||
"exports": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"./index.js" | ||
"dist" | ||
], | ||
"devDependencies": { | ||
"eslint": "8.56.0", | ||
"eslint-config-silverwind": "80.0.3", | ||
"@types/node": "20.12.8", | ||
"eslint": "8.57.0", | ||
"eslint-config-silverwind": "83.0.4", | ||
"eslint-config-silverwind-typescript": "3.2.3", | ||
"jsdom": "24.0.0", | ||
"updates": "15.1.2", | ||
"typescript": "5.4.5", | ||
"typescript-config-silverwind": "3.0.4", | ||
"updates": "16.0.1", | ||
"versions": "12.0.1", | ||
"vitest": "1.2.2", | ||
"vitest-config-silverwind": "5.1.1" | ||
"vite": "5.2.11", | ||
"vite-plugin-dts": "3.9.0", | ||
"vite-string-plugin": "1.3.0", | ||
"vitest": "1.5.3", | ||
"vitest-config-silverwind": "8.0.5" | ||
} | ||
} |
@@ -21,6 +21,8 @@ # clippie | ||
See [index.html](./index.html) for more example. | ||
## API | ||
### clippie(content, [options]) | ||
- `content` *String*, *Blob*, *Array[String,Blob]*: Content to copy. If an Array is passed, will construct a `ClipboardItem` with all items. Only one item per `type` (`blob.type` or `text/plain` for strings) is allowed. | ||
- `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. | ||
- `options` *Object* | ||
@@ -31,8 +33,2 @@ - `reject`: *Boolean*: Whether to reject on unexpected errors. Default: `false`. | ||
## Notes | ||
Firefox needs `dom.events.asyncClipboard.clipboardItem` in `about:config` to enable image copying. Track [Bug 1809106](https://bugzilla.mozilla.org/show_bug.cgi?id=1809106) for updates. | ||
See [index.html](./index.html) for various example uses. | ||
© [silverwind](https://github.com/silverwind), distributed under BSD licence |
3810
4
55
14
33