Comments (4)
For sure. What did you have in mind? Currently require("copy-paste")
returns an object with the three main functions:
{ copy: [Function],
paste: [Function],
noConflict: [Function] }
Let me know if anything should be added.
from node-copy-paste.
I was thinking perhaps some option to disable the global variable attachment, and a callback function on copy
and paste
rather than an automatically injected console.log
?
from node-copy-paste.
You should be able to disable the global copy
and paste
functions by calling noConflict
. Originally I created this library to make working in the REPL easier. I liked the idea of simply calling require("copy-paste")
and immediately being able to use copy
and paste
, so I made them global by default
Callbacks for copy
and paste
are good ideas. I'd happily accept a pull request, but if you don't have the time, no worries. I'll try to add them some time this weekend.
from node-copy-paste.
Ah nice, didn't realize what noConflict
was, but that's great. Totally understand the reason for attaching them to global in some circumstances and not objected to that at all. I'll get in a PR with those callbacks if I can at some point today : )
from node-copy-paste.
Related Issues (20)
- Copy function
- DeprecationWarning: 'GLOBAL' is deprecated, use 'global' HOT 1
- Doesn't work with freebsd HOT 1
- 'copy' function does not handle 'undefined' text HOT 1
- copy-paste fails if you try to repeat the activity in a test HOT 2
- [window] support copy rtf format to clipboard HOT 3
- [windows] slow paste performance HOT 1
- Forward: Chinese encoding problem on Macbook ... HOT 1
- Does not appear to work on Ubuntu HOT 3
- Doesn't work on default Debian install - as 'xclip' is not installed HOT 1
- Question - Cloud SaaS and copy paste
- Bundle error: Error: Cannot find module './platform/openbsd' HOT 2
- win7 test case fail HOT 2
- Please remove sync-exec from package.json HOT 3
- Question:is it possible to get file reference when I press ctrl + c? HOT 1
- Please tag v1.3.0 in Git HOT 1
- copy function in Object is not working HOT 1
- Creates Error when trying to build with esbuild HOT 2
- [Windows] Paste function is not working HOT 1
- Support wayland display protocol
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-copy-paste.