This commit is contained in:
Wliu
2018-01-04 21:01:20 -05:00
parent a1668fc953
commit d59b779c0a

View File

@@ -1,7 +1,5 @@
/** @babel */
import crypto from 'crypto'
import {clipboard} from 'electron'
const crypto = require('crypto')
const {clipboard} = require('electron')
// Extended: Represents the clipboard used for copying and pasting in Atom.
//
@@ -9,12 +7,13 @@ import {clipboard} from 'electron'
//
// ## Examples
//
// ```coffee
// ```js
// atom.clipboard.write('hello')
//
// console.log(atom.clipboard.read()) # 'hello'
// console.log(atom.clipboard.read()) // 'hello'
// ```
export default class Clipboard {
module.exports =
class Clipboard {
constructor () {
this.reset()
}
@@ -60,7 +59,7 @@ export default class Clipboard {
// * `text` The {String} clipboard text.
// * `metadata` The metadata stored by an earlier call to {::write}.
readWithMetadata () {
let text = this.read()
const text = this.read()
if (this.signatureForMetadata === this.md5(text)) {
return {text, metadata: this.metadata}
} else {