lib/run_command.js
function stringify(origin)
{
  var i, keys, prepared = {};

  keys = Object.keys(origin);
  i = keys.length;

  while (i--)
  {
    // skip un-stringable things
    if (typeOf(origin[keys[i]]) == 'function'
      || typeOf(origin[keys[i]]) == 'object')
    {
      continue;
    }

    // export it
    prepared[keys[i]] = origin[keys[i]];

    // make it shell ready
    if (typeOf(prepared[keys[i]]) == 'boolean')
    {
      prepared[keys[i]] = prepared[keys[i]] ? '1' : '';
    }

    if (typeOf(prepared[keys[i]]) == 'undefined' || typeOf(prepared[keys[i]]) == 'null')
    {
      prepared[keys[i]] = '';
    }

    // convert everything else to string
    prepared[keys[i]] = prepared[keys[i]].toString();
  }

  return prepared;
}
function stringify(origin)
{
  var i, keys, prepared = {};

  keys = Object.keys(origin);
  i = keys.length;

  while (i--)
  {
    // skip un-stringable things
    if (typeOf(origin[keys[i]]) == 'function'
      || typeOf(origin[keys[i]]) == 'object')
    {
      continue;
    }

    // export it
    prepared[keys[i]] = origin[keys[i]];

    // make it shell ready
    if (typeOf(prepared[keys[i]]) == 'boolean')
    {
      prepared[keys[i]] = prepared[keys[i]] ? '1' : '';
    }

    if (typeOf(prepared[keys[i]]) == 'undefined' || typeOf(prepared[keys[i]]) == 'null')
    {
      prepared[keys[i]] = '';
    }

    // convert everything else to string
    prepared[keys[i]] = prepared[keys[i]].toString();
  }

  return prepared;
}
function stringify ( origin ) { var i , keys , prepared = { } ; keys = Object . keys ( origin ) ; i = keys . length ; while ( i -- ) { // skip un-stringable things if ( typeOf ( origin [ keys [ i ] ] ) == 'function' || typeOf ( origin [ keys [ i ] ] ) == 'object' ) { continue ; } // export it prepared [ keys [ i ] ] = origin [ keys [ i ] ] ; // make it shell ready if ( typeOf ( prepared [ keys [ i ] ] ) == 'boolean' ) { prepared [ keys [ i ] ] = prepared [ keys [ i ] ] ? '1' : '' ; } if ( typeOf ( prepared [ keys [ i ] ] ) == 'undefined' || typeOf ( prepared [ keys [ i ] ] ) == 'null' ) { prepared [ keys [ i ] ] = '' ; } // convert everything else to string prepared [ keys [ i ] ] = prepared [ keys [ i ] ] . toString ( ) ; } return prepared ; }
Decouples and "stringifies" provided object
to use with `executioner` shell runner

@param   {object} origin - params object
@returns {object} - new object with stringified properties
Decouples and stringifies provided object to use with executioner shell runner