Comparing version 1.0.1 to 1.0.2
@@ -15,3 +15,3 @@ (function (global, factory) { | ||
*/ | ||
function copyToClipboard(str) { | ||
function copy(str) { | ||
// Create a <textarea> element | ||
@@ -65,8 +65,8 @@ var el = document.createElement('textarea'); | ||
*/ | ||
function isCopySupported() { | ||
function isSupported() { | ||
return typeof document !== 'undefined' && typeof document.queryCommandSupported === 'function' && document.queryCommandSupported('copy'); | ||
} | ||
exports.copy = copyToClipboard; | ||
exports.isSupported = isCopySupported; | ||
exports.copy = copy; | ||
exports.isSupported = isSupported; | ||
@@ -73,0 +73,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
{ | ||
"name": "clipbrd", | ||
"version": "1.0.1", | ||
"description": "Lightweight copy to clipboard for modern browsers ", | ||
"main": "dist/index.min.js", | ||
"version": "1.0.2", | ||
"description": "Lightweight copy to clipboard for modern browsers", | ||
"main": "dist/index.js", | ||
"module": "src/index.js", | ||
@@ -17,3 +17,3 @@ "files": [ | ||
"lint:fix": "eslint --ext .js ./src --fix", | ||
"test": "jest", | ||
"test": "lint", | ||
"coverage": "jest --coverage", | ||
@@ -20,0 +20,0 @@ "prepublishOnly": "npm run lint && npm run build" |
# clipbrd | ||
[![NPM Package](https://img.shields.io/npm/v/clipbrd.svg?style=flat-square)](https://www.npmjs.org/package/clipbrd) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/shrpne/clipbrd/blob/master/LICENSE) | ||
[![Minified Size](https://img.shields.io/bundlephobia/min/clipbrd.svg?style=flat-square)](https://bundlephobia.com/result?p=clipbrd) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://github.com/shrpne/clipbrd/blob/master/LICENSE) | ||
Lightweight module to copy text to the clipboard in modern browsers | ||
Lightweight module to copy text to the clipboard in modern browsers *(< 1kB minified)* | ||
@@ -8,0 +9,0 @@ |
@@ -9,3 +9,3 @@ /** | ||
*/ | ||
export default function copyToClipboard(str) { | ||
export default function copy(str) { | ||
// Create a <textarea> element | ||
@@ -12,0 +12,0 @@ const el = document.createElement('textarea'); |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
export default function isCopySupported() { | ||
export default function isSupported() { | ||
return typeof document !== 'undefined' | ||
@@ -10,0 +10,0 @@ && typeof document.queryCommandSupported === 'function' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9437
60