Update code style
This commit is contained in:
parent
d32632f768
commit
b2542a27c3
1 changed files with 8 additions and 8 deletions
|
@ -5,15 +5,15 @@ const v8Util = process.atomBinding('v8_util')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
canMakePayments: function() {
|
canMakePayments: function () {
|
||||||
return binding.canMakePayments()
|
return binding.canMakePayments()
|
||||||
},
|
},
|
||||||
|
|
||||||
getReceiptURL: function() {
|
getReceiptURL: function () {
|
||||||
return binding.getReceiptURL()
|
return binding.getReceiptURL()
|
||||||
},
|
},
|
||||||
|
|
||||||
purchaseProduct: function(productID, quantity = 1, callback) {
|
purchaseProduct: function (productID, quantity = 1, callback) {
|
||||||
if (typeof productID !== 'string') {
|
if (typeof productID !== 'string') {
|
||||||
throw new TypeError('productID must be a string')
|
throw new TypeError('productID must be a string')
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ module.exports = {
|
||||||
return binding.purchaseProduct(productID, quantity, callback)
|
return binding.purchaseProduct(productID, quantity, callback)
|
||||||
},
|
},
|
||||||
|
|
||||||
addTransactionListener: function(callback) {
|
addTransactionListener: function (callback) {
|
||||||
if (typeof callback !== 'function') {
|
if (typeof callback !== 'function') {
|
||||||
throw new TypeError('callback must be a function')
|
throw new TypeError('callback must be a function')
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark standard asynchronous functions.
|
// Mark standard asynchronous functions.
|
||||||
v8Util.setHiddenValue(
|
|
||||||
module.exports.purchaseProduct, 'asynchronous', true)
|
|
||||||
v8Util.setHiddenValue(
|
v8Util.setHiddenValue(
|
||||||
module.exports.addTransactionListener, 'asynchronous', true)
|
module.exports.purchaseProduct, 'asynchronous', true)
|
||||||
|
v8Util.setHiddenValue(
|
||||||
|
module.exports.addTransactionListener, 'asynchronous', true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue