Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ClientSession.prototype.browse = function (nodesToBrowse, callback) {
const self = this;
self.requestedMaxReferencesPerNode = self.requestedMaxReferencesPerNode || 10000;
assert(_.isFinite(self.requestedMaxReferencesPerNode));
assert(_.isFunction(callback));
const isArray = _.isArray(nodesToBrowse);
if (!isArray) {
nodesToBrowse = [nodesToBrowse];
}
nodesToBrowse = nodesToBrowse.map(coerceBrowseDescription);
const request = new browse_service.BrowseRequest({
nodesToBrowse: nodesToBrowse,
requestedMaxReferencesPerNode: self.requestedMaxReferencesPerNode
});
self.performMessageTransaction(request, function (err, response) {
let i, r;
if (err) {
return callback(err, response);
}
assert(response instanceof browse_service.BrowseResponse);
if (self.requestedMaxReferencesPerNode > 0) {