Could this be moved to a separate function that describes what is being checked e.g.

```
function containsTargetBed(beds, targetBedBarcode) // or whatever a suitable method name would be
  return _.some(beds, function(bedPair) {
    return (bedPair[0].barcode === targetBedBarcode);
  });
}

if ( containsTargetBed(robot.beds, bed) ) {
  // do something
} else {
  // do something else
}
```

It would just make it a little bit clearer for the future