diff --git a/index.js b/index.js index 954d5f9..e517f9b 100755 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ "use strict"; -var deselectCurrent = require("toggle-selection"); +import deselectCurrent from 'toggle-selection'; var clipboardToIE11Formatting = { "text/plain": "Text", @@ -112,4 +112,4 @@ function copy(text, options) { return success; } -module.exports = copy; +export default copy; diff --git a/package.json b/package.json index 25fe889..9c76e24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "copy-to-clipboard", - "version": "3.3.3", + "version": "4.3.3", + "type": "module", "description": "Copy stuff into clipboard using JS with fallbacks", "main": "index.js", "types": "index.d.ts",