Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pkg.givenProvider = requestManager.Manager.givenProvider;
pkg.providers = requestManager.Manager.providers;
pkg._provider = pkg._requestManager.provider;
// add SETPROVIDER function (don't overwrite if already existing)
if (!pkg.setProvider) {
pkg.setProvider = function (provider, net) {
pkg._requestManager.setProvider(provider, net);
pkg._provider = pkg._requestManager.provider;
return true;
};
}
// attach batch request creation
pkg.BatchRequest = requestManager.BatchManager.bind(null, pkg._requestManager);
// attach extend function
pkg.extend = extend(pkg);
},
addProviders: function (pkg) {