https://github.com/jonschlinkert/to-clipboard
Copy to the clipboard.
https://github.com/jonschlinkert/to-clipboard
clipboard copy paste
Last synced: 3 months ago
JSON representation
Copy to the clipboard.
- Host: GitHub
- URL: https://github.com/jonschlinkert/to-clipboard
- Owner: jonschlinkert
- License: mit
- Created: 2015-08-19T09:40:05.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T16:58:26.000Z (about 9 years ago)
- Last Synced: 2025-10-22T19:53:57.509Z (7 months ago)
- Topics: clipboard, copy, paste
- Language: JavaScript
- Size: 13.7 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# to-clipboard [](http://badge.fury.io/js/to-clipboard)
> Copy to the clipboard. Cross-platform: windows, linux and darwin (mac).
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i to-clipboard --save
```
## Usage
```js
var toClipboard = require('to-clipboard');
// async
toClipboard('foo bar baz', function (err) {});
// sync
toClipboard.sync('foo bar baz');
```
See [examples](./examples.js).
## Other useful CLI projects
* [lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://www.npmjs.com/package/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps)
* [spawn-commands](https://www.npmjs.com/package/spawn-commands): Launches a new process with the given command, with command line arguments in `args`. Should… [more](https://www.npmjs.com/package/spawn-commands) | [homepage](https://github.com/jonschlinkert/spawn-commands)
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/to-clipboard/issues/new).
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on September 12, 2015._