examples/cordova1/plugins/branch-cordova-sdk/src/index.js
function execute(method, params) {
  var output = !params ? [] : params;

  if (method == "getStandardEvents") {
    return new Promise(function promise(resolve, reject) {
      resolve(standardEvent);  
    });
  }

  return new Promise(function promise(resolve, reject) {
    exec(
      function success(res) {
        resolve(res);
      },
      function failure(err) {
        reject(err);
      },
      API_CLASS,
      method,
      output
    );
  });
}
function execute(method, params) {
  var output = !params ? [] : params;

  if (method == "getStandardEvents") {
    return new Promise(function promise(resolve, reject) {
      resolve(standardEvent);  
    });
  }

  return new Promise(function promise(resolve, reject) {
    exec(
      function success(res) {
        resolve(res);
      },
      function failure(err) {
        reject(err);
      },
      API_CLASS,
      method,
      output
    );
  });
}
function execute ( method , params ) { var output = ! params ? [ ] : params ; if ( method == "getStandardEvents" ) { return new Promise ( function promise ( resolve , reject ) { resolve ( standardEvent ) ; } ) ; } return new Promise ( function promise ( resolve , reject ) { exec ( function success ( res ) { resolve ( res ) ; } , function failure ( err ) { reject ( err ) ; } , API_CLASS , method , output ) ; } ) ; }
JavsSript to SDK wrappers
JavsSript to SDK wrappers