Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const buildEntity = entityId => {
entityId = entityId.value || entityId
const id = getNumericId(entityId)
const type = entityId[0] === 'Q' ? 'item' : 'property'
return { 'entity-type': type, 'numeric-id': parseInt(id) }
}