clipboardy 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -0
- package/package.json +5 -4
- package/readme.md +7 -5
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
const isWSL = require('is-wsl');
|
|
2
3
|
const termux = require('./lib/termux.js');
|
|
3
4
|
const linux = require('./lib/linux.js');
|
|
4
5
|
const macos = require('./lib/macos.js');
|
|
@@ -17,6 +18,11 @@ const platformLib = (() => {
|
|
|
17
18
|
|
|
18
19
|
return termux;
|
|
19
20
|
default:
|
|
21
|
+
// `process.platform === 'linux'` for WSL.
|
|
22
|
+
if (isWSL) {
|
|
23
|
+
return windows;
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
return linux;
|
|
21
27
|
}
|
|
22
28
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clipboardy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Access the system clipboard (copy/paste)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/clipboardy",
|
|
@@ -36,11 +36,12 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"arch": "^2.1.1",
|
|
39
|
-
"execa": "^1.0.0"
|
|
39
|
+
"execa": "^1.0.0",
|
|
40
|
+
"is-wsl": "^2.1.1"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"ava": "^2.1.0",
|
|
43
|
-
"tsd": "^0.
|
|
44
|
-
"xo": "^0.
|
|
44
|
+
"tsd": "^0.10.0",
|
|
45
|
+
"xo": "^0.25.3"
|
|
45
46
|
}
|
|
46
47
|
}
|
package/readme.md
CHANGED
|
@@ -57,12 +57,14 @@ The text to write to the clipboard.
|
|
|
57
57
|
Read (paste) from the clipboard synchronously.
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
##
|
|
60
|
+
## FAQ
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
- [copy-text-to-clipboard](https://github.com/sindresorhus/copy-text-to-clipboard) - Copy text to the clipboard in the browser
|
|
62
|
+
#### Where can I find the source of the bundled binaries?
|
|
64
63
|
|
|
64
|
+
The [Linux binary](https://github.com/sindresorhus/clipboardy/blob/master/fallbacks/linux/xsel) is just a bundled version of [`xsel`](https://linux.die.net/man/1/xsel). The source for the [Windows binary](https://github.com/sindresorhus/clipboardy/blob/master/fallbacks/windows/clipboard_x86_64.exe) can be found [here](https://github.com/sindresorhus/win-clipboard).
|
|
65
65
|
|
|
66
|
-
## License
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [clipboard-cli](https://github.com/sindresorhus/clipboard-cli) - CLI for this module
|
|
70
|
+
- [copy-text-to-clipboard](https://github.com/sindresorhus/copy-text-to-clipboard) - Copy text to the clipboard in the browser
|