Update code style

This commit is contained in:
Adrien Fery 2017-12-02 11:17:55 +01:00 committed by Cheng Zhao
parent d32632f768
commit b2542a27c3

View file

@ -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)