lib/repl.js
function defineBuiltinVars(context) {
  // define salesforce package root objects
  for (var key in sf) {
    if (sf.hasOwnProperty(key) && !global[key]) {
      context[key] = sf[key];
    }
  }
  // expose salesforce package root as "$sf" in context.
  context.$sf = sf;

  // create default connection object
  var conn = new sf.Connection();

  for (var prop in conn) {
    if (prop.indexOf('_') === 0) { // ignore private
      continue;
    }
    if (_.isFunction(conn[prop])) {
      context[prop] = _.bind(conn[prop], conn);
    } else if (_.isObject(conn[prop])) {
      defineProp(context, conn, prop);
    }
  }

  // expose default connection as "$conn"
  context.$conn = conn;
}
function defineBuiltinVars(context) {
  // define salesforce package root objects
  for (var key in sf) {
    if (sf.hasOwnProperty(key) && !global[key]) {
      context[key] = sf[key];
    }
  }
  // expose salesforce package root as "$sf" in context.
  context.$sf = sf;

  // create default connection object
  var conn = new sf.Connection();

  for (var prop in conn) {
    if (prop.indexOf('_') === 0) { // ignore private
      continue;
    }
    if (_.isFunction(conn[prop])) {
      context[prop] = _.bind(conn[prop], conn);
    } else if (_.isObject(conn[prop])) {
      defineProp(context, conn, prop);
    }
  }

  // expose default connection as "$conn"
  context.$conn = conn;
}
function defineBuiltinVars ( context ) { // define salesforce package root objects for ( var key in sf ) { if ( sf . hasOwnProperty ( key ) && ! global [ key ] ) { context [ key ] = sf [ key ] ; } } // expose salesforce package root as "$sf" in context. context . $sf = sf ; // create default connection object var conn = new sf . Connection ( ) ; for ( var prop in conn ) { if ( prop . indexOf ( '_' ) === 0 ) { // ignore private continue ; } if ( _ . isFunction ( conn [ prop ] ) ) { context [ prop ] = _ . bind ( conn [ prop ] , conn ) ; } else if ( _ . isObject ( conn [ prop ] ) ) { defineProp ( context , conn , prop ) ; } } // expose default connection as "$conn" context . $conn = conn ; }
Map all node-salesforce object to REPL context
@private
Map all node - salesforce object to REPL context