Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) {
let meta = getMetadata(path.slice(0, path.length - 1).join('.'))
let fromDefaults = _.get(app.deltaCache.defaults, path.join('.'))
if (meta || fromDefaults) {
res.json({...meta, ...fromDefaults})
return
}
}
if (
path.length > 5 &&
path[path.length - 1] === 'units' &&
path[path.length - 2] === 'meta'
) {
let units = _.get(app.deltaCache.defaults, path.join('.'))
if (!units) {
units = getUnits(path.slice(0, path.length - 2).join('.'))
}
if (units) {
res.json(units)
return
}
}
if ( path[0] === 'vessels' && path[1] === 'self' ) {
path[1] = app.selfId
}
function sendResult(last, aPath) {
if (last) {
// tslint:disable-next-line: forin
for (const i in aPath) {
const p = aPath[i]