Socket
Socket
Sign inDemoInstall

@capacitor/clipboard

Package Overview
Dependencies
Maintainers
7
Versions
588
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/clipboard - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.1.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/clipboard@0.1.0...@capacitor/clipboard@0.1.1) (2020-10-30)
**Note:** Version bump only for package @capacitor/clipboard
# 0.1.0 (2020-10-12)

@@ -8,0 +16,0 @@

1

dist/esm/definitions.js

@@ -0,1 +1,2 @@

export {};
//# sourceMappingURL=definitions.js.map

12

dist/esm/web.js

@@ -1,2 +0,2 @@

import { WebPlugin, UnsupportedBrowserException } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';
export class ClipboardWeb extends WebPlugin {

@@ -10,3 +10,3 @@ constructor() {

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new UnsupportedBrowserException('Clipboard API not available in this browser');
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -31,3 +31,3 @@ if (options.string !== undefined) {

else {
throw new UnsupportedBrowserException('Writing images to the clipboard is not supported in this browser');
throw this.unavailable('Writing images to the clipboard is not supported in this browser');
}

@@ -41,3 +41,3 @@ }

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new UnsupportedBrowserException('Clipboard API not available in this browser');
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -64,3 +64,3 @@ if (typeof ClipboardItem !== 'undefined') {

!navigator.clipboard.readText) {
throw new UnsupportedBrowserException('Reading from clipboard not supported in this browser');
throw this.unavailable('Reading from clipboard not supported in this browser');
}

@@ -74,3 +74,3 @@ const text = await navigator.clipboard.readText();

!navigator.clipboard.writeText) {
throw new UnsupportedBrowserException('Writting to clipboard not supported in this browser');
throw this.unavailable('Writting to clipboard not supported in this browser');
}

@@ -77,0 +77,0 @@ await navigator.clipboard.writeText(text);

@@ -12,3 +12,3 @@ var capacitorClipboard = (function (exports, core) {

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new core.UnsupportedBrowserException('Clipboard API not available in this browser');
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -33,3 +33,3 @@ if (options.string !== undefined) {

else {
throw new core.UnsupportedBrowserException('Writing images to the clipboard is not supported in this browser');
throw this.unavailable('Writing images to the clipboard is not supported in this browser');
}

@@ -43,3 +43,3 @@ }

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new core.UnsupportedBrowserException('Clipboard API not available in this browser');
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -66,3 +66,3 @@ if (typeof ClipboardItem !== 'undefined') {

!navigator.clipboard.readText) {
throw new core.UnsupportedBrowserException('Reading from clipboard not supported in this browser');
throw this.unavailable('Reading from clipboard not supported in this browser');
}

@@ -76,3 +76,3 @@ const text = await navigator.clipboard.readText();

!navigator.clipboard.writeText) {
throw new core.UnsupportedBrowserException('Writting to clipboard not supported in this browser');
throw this.unavailable('Writting to clipboard not supported in this browser');
}

@@ -111,2 +111,4 @@ await navigator.clipboard.writeText(text);

Object.defineProperty(exports, '__esModule', { value: true });
return exports;

@@ -113,0 +115,0 @@

{
"name": "@capacitor/clipboard",
"version": "0.1.0",
"version": "0.1.1",
"description": "The Clipboard API enables copy and pasting to/from the system clipboard.",

@@ -39,10 +39,10 @@ "main": "dist/plugin.js",

"devDependencies": {
"@capacitor/android": "^3.0.0-alpha.5",
"@capacitor/core": "^3.0.0-alpha.5",
"@capacitor/docgen": "^0.0.6",
"@capacitor/ios": "^3.0.0-alpha.5",
"@capacitor/android": "^3.0.0-alpha.6",
"@capacitor/core": "^3.0.0-alpha.6",
"@capacitor/docgen": "^0.0.10",
"@capacitor/ios": "^3.0.0-alpha.6",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"eslint": "^7.11.0",

@@ -54,6 +54,6 @@ "prettier": "^2.0.5",

"swiftlint": "^1.0.1",
"typescript": "~3.9.7"
"typescript": "~4.0.3"
},
"peerDependencies": {
"@capacitor/core": "^3.0.0-alpha.5"
"@capacitor/core": "^3.0.0-alpha.6"
},

@@ -76,3 +76,3 @@ "prettier": "@ionic/prettier-config",

},
"gitHead": "e2856f5d9d77b26a16ebe2a5e5708832a7ff063b"
"gitHead": "3ab6d510236e3f595945c7de16ca731323cc295b"
}

@@ -5,11 +5,21 @@ # @capacitor/clipboard

<!--DOCGEN_INDEX_START-->
## Install
```bash
npm install @capacitor/clipboard
npx cap sync
```
## API
<docgen-index>
* [`write(...)`](#write)
* [`read()`](#read)
* [Interfaces](#interfaces)
<!--DOCGEN_INDEX_END-->
<!--DOCGEN_API_START-->
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
## API

@@ -24,8 +34,6 @@ ### write(...)

| Param | Type |
| ----------- | ----------------------------------------------------------------------- |
| **options** | <code><a href="#clipboardwriteoptions">ClipboardWriteOptions</a></code> |
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| **`options`** | <code><a href="#clipboardwriteoptions">ClipboardWriteOptions</a></code> |
**Returns:** <code>Promise&lt;void&gt;</code>
**Since:** 1.0.0

@@ -75,3 +83,2 @@

<!--DOCGEN_API_END-->
</docgen-api>

@@ -1,2 +0,2 @@

import { WebPlugin, UnsupportedBrowserException } from '@capacitor/core';
import { WebPlugin } from '@capacitor/core';

@@ -27,5 +27,3 @@ import type {

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new UnsupportedBrowserException(
'Clipboard API not available in this browser',
);
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -47,3 +45,3 @@

} else {
throw new UnsupportedBrowserException(
throw this.unavailable(
'Writing images to the clipboard is not supported in this browser',

@@ -59,5 +57,3 @@ );

if (typeof navigator === 'undefined' || !navigator.clipboard) {
throw new UnsupportedBrowserException(
'Clipboard API not available in this browser',
);
throw this.unavailable('Clipboard API not available in this browser');
}

@@ -86,3 +82,3 @@

) {
throw new UnsupportedBrowserException(
throw this.unavailable(
'Reading from clipboard not supported in this browser',

@@ -102,3 +98,3 @@ );

) {
throw new UnsupportedBrowserException(
throw this.unavailable(
'Writting to clipboard not supported in this browser',

@@ -105,0 +101,0 @@ );

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc