Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit e22d240

Browse files
author
Will Anderson
committed
Rename cb to callback and switch to setImmediate
1 parent 06e7d8b commit e22d240

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

HybridMobileDeploy.ios.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@ var Sdk = require("hybrid-mobile-deploy-sdk/script/acquisition-sdk").Acquisition
1212
var sdk;
1313
var config;
1414

15-
function getConfiguration(cb) {
15+
function getConfiguration(callback) {
1616
if (config) {
17-
setTimeout(function() {
18-
cb(null, config);
17+
setImmediate(function() {
18+
callback(/*error=*/ null, config);
1919
});
2020
} else {
2121
NativeHybridMobileDeploy.getConfiguration(function(err, configuration) {
22-
if (err) cb(err);
22+
if (err) callback(err);
2323
config = configuration;
24-
cb(null, config);
24+
callback(/*error=*/ null, config);
2525
});
2626
}
2727
}
2828

29-
function getSdk(cb) {
29+
function getSdk(callback) {
3030
if (sdk) {
31-
setTimeout(function() {
32-
cb(null, sdk);
31+
setImmediate(function() {
32+
callback(/*error=*/ null, sdk);
3333
});
3434
} else {
3535
getConfiguration(function(err, configuration) {
3636
sdk = new Sdk(requestFetchAdapter, configuration);
37-
cb(null, sdk);
37+
callback(/*error=*/ null, sdk);
3838
});
3939
}
4040
}
4141

42-
function queryUpdate(cb) {
42+
function queryUpdate(callback) {
4343
getSdk(function(err, sdk) {
4444
var pkg = {appVersion: "1.2.3"};
45-
sdk.queryUpdateWithCurrentPackage(pkg, cb);
45+
sdk.queryUpdateWithCurrentPackage(pkg, callback);
4646
});
4747
}
4848

0 commit comments

Comments
 (0)