mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Update code style
This commit is contained in:
@@ -5,15 +5,15 @@ const v8Util = process.atomBinding('v8_util')
|
||||
|
||||
module.exports = {
|
||||
|
||||
canMakePayments: function() {
|
||||
canMakePayments: function () {
|
||||
return binding.canMakePayments()
|
||||
},
|
||||
|
||||
getReceiptURL: function() {
|
||||
getReceiptURL: function () {
|
||||
return binding.getReceiptURL()
|
||||
},
|
||||
|
||||
purchaseProduct: function(productID, quantity = 1, callback) {
|
||||
purchaseProduct: function (productID, quantity = 1, callback) {
|
||||
if (typeof productID !== 'string') {
|
||||
throw new TypeError('productID must be a string')
|
||||
}
|
||||
@@ -24,7 +24,7 @@ module.exports = {
|
||||
return binding.purchaseProduct(productID, quantity, callback)
|
||||
},
|
||||
|
||||
addTransactionListener: function(callback) {
|
||||
addTransactionListener: function (callback) {
|
||||
if (typeof callback !== 'function') {
|
||||
throw new TypeError('callback must be a function')
|
||||
}
|
||||
@@ -32,8 +32,8 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
// Mark standard asynchronous functions.
|
||||
v8Util.setHiddenValue(
|
||||
module.exports.purchaseProduct, 'asynchronous', true)
|
||||
// Mark standard asynchronous functions.
|
||||
v8Util.setHiddenValue(
|
||||
module.exports.addTransactionListener, 'asynchronous', true)
|
||||
module.exports.purchaseProduct, 'asynchronous', true)
|
||||
v8Util.setHiddenValue(
|
||||
module.exports.addTransactionListener, 'asynchronous', true)
|
||||
|
||||
Reference in New Issue
Block a user