Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (callback) {
if (err) {
return callback(err);
} else {
return parseXML(xml, callback, options);
}
}
}
}
if (this.authenticated()) {
return oauth.xhr({ method: 'GET', path: path }, done);
} else {
var url = urlroot + path;
var controller = new AbortController();
d3_xml(url, { signal: controller.signal })
.then(function(data) {
done(null, data);
})
.catch(function(err) {
if (err.name === 'AbortError') return;
// d3-fetch includes status in the error message,
// but we can't access the response itself
// https://github.com/d3/d3-fetch/issues/27
var match = err.message.match(/^\d{3}/);
if (match) {
done({ status: +match[0], statusText: err.message });
} else {
done(err.message);
}
});
return controller;
promise2 = d3Fetch.dsv(';', url, parseRow);
promise2 = d3Fetch.dsv(';', url, init, parseRow);
promise1 = d3Fetch.tsv(url);
promise1 = d3Fetch.tsv(url, init);
promise2 = d3Fetch.tsv(url, parseRow);
promise2 = d3Fetch.tsv(url, init, parseRow);
let docPromise: Promise;
docPromise = d3Fetch.html(url);
docPromise = d3Fetch.html(url, init);
docPromise = d3Fetch.svg(url);
docPromise = d3Fetch.svg(url, init);
let xmlDocPromise: Promise;
xmlDocPromise = d3Fetch.xml(url);
xmlDocPromise = d3Fetch.xml(url, init);
promise2 = d3Fetch.dsv(';', url, init, parseRow);
promise1 = d3Fetch.tsv(url);
promise1 = d3Fetch.tsv(url, init);
promise2 = d3Fetch.tsv(url, parseRow);
promise2 = d3Fetch.tsv(url, init, parseRow);
let docPromise: Promise;
docPromise = d3Fetch.html(url);
docPromise = d3Fetch.html(url, init);
docPromise = d3Fetch.svg(url);
docPromise = d3Fetch.svg(url, init);
let xmlDocPromise: Promise;
xmlDocPromise = d3Fetch.xml(url);
xmlDocPromise = d3Fetch.xml(url, init);