phantomjs/capture.js
function argsToObject(args) {
  var options = {};
  options.address = args.shift();
  options.output = args.shift();

  // Pair two arguments, while transforming the key to camelCase
  for (i = 0; i < args.length; i = i + 2) {
    options[toCamelCase(args[i].substr(2))] = args[i + 1];
  }

  return options;
}
function argsToObject(args) {
  var options = {};
  options.address = args.shift();
  options.output = args.shift();

  // Pair two arguments, while transforming the key to camelCase
  for (i = 0; i < args.length; i = i + 2) {
    options[toCamelCase(args[i].substr(2))] = args[i + 1];
  }

  return options;
}
function argsToObject ( args ) { var options = { } ; options . address = args . shift ( ) ; options . output = args . shift ( ) ; // Pair two arguments, while transforming the key to camelCase for ( i = 0 ; i < args . length ; i = i + 2 ) { options [ toCamelCase ( args [ i ] . substr ( 2 ) ) ] = args [ i + 1 ] ; } return options ; }
Transform an array to an object literal
@param {Array} args Array with seperate arguments
@return {Object}
Transform an array to an object literal