Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
metadata.get(i, {valueEncoding: messages.Node}, function (err, node) {
if (err) return cb(err)
var st = node.value && stat.decode(node.value)
if (!node.value || (!st.offset && !st.blocks) || (!st.byteOffset && !st.blocks)) {
return get(metadata, btm, i - 1, cb) // TODO: check the index instead for fast lookup
}
cb(null, i, node, st)
})
}
metadata.get(i, {valueEncoding: messages.Node}, function(err, node) {
if (err) {
return cb(err)
}
const st = node.value && Stat.decode(node.value)
if (!node.value || (!st.offset && !st.blocks) || (!st.byteOffset && !st.blocks)) {
return get(metadata, btm, i - 1, cb)
}
cb(null, i, node, st)
})
}