salesforce.js
function Salesforce(username, password, token, wsdl) {

    //Required NodeJS libraries
    this.q = require("q");
    this.soap = require("soap");

    //Salesforce access data
    this.username = username;
    this.password = password;
    this.token = token;
    this.wsdl = wsdl || "./node_modules/soap_salesforce/wsdl/enterprise.xml";

    //Other properties
    this.promise; //A promise will be used for returning soapClient after finishing Salesforce login
    this.soapClient; //Salesforce SOAP client instance will be stored here
}
function Salesforce(username, password, token, wsdl) {

    //Required NodeJS libraries
    this.q = require("q");
    this.soap = require("soap");

    //Salesforce access data
    this.username = username;
    this.password = password;
    this.token = token;
    this.wsdl = wsdl || "./node_modules/soap_salesforce/wsdl/enterprise.xml";

    //Other properties
    this.promise; //A promise will be used for returning soapClient after finishing Salesforce login
    this.soapClient; //Salesforce SOAP client instance will be stored here
}
function Salesforce ( username , password , token , wsdl ) { //Required NodeJS libraries this . q = require ( "q" ) ; this . soap = require ( "soap" ) ; //Salesforce access data this . username = username ; this . password = password ; this . token = token ; this . wsdl = wsdl || "./node_modules/soap_salesforce/wsdl/enterprise.xml" ; //Other properties this . promise ; //A promise will be used for returning soapClient after finishing Salesforce login this . soapClient ; //Salesforce SOAP client instance will be stored here }
Salesforce connection library constructor.
Salesforce connection library constructor .