Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function extractValues(stream, propertiesToExtract, callback) {
var saxStream = sax.createStream(saxStrict, saxOptions);
var firstValid = {};
var lastValid = {};
var keys = Object.keys(propertiesToExtract);
var keyValues = keys.map(function(k) { return propertiesToExtract[k]; });
var validRanges = {};
for (var i in keys) {
validRanges[keys[i] + '_' + keyValues[i]] = [];
}
saxStream.onopentag = onOpenTag;
stream
.pipe(saxStream)
.on('end', doCallback);
function onOpenTag(node) {
var property;