All files / module/resource hasLoadableRelationship.js

50% Statements 1/2
0% Branches 0/2
50% Functions 1/2
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9            13x    
/**
 * Check if an object has a loadable relationship
 *
 * @param {Object} obj
 */
export function hasLoadableRelationship (obj) {
  return name => !obj.hasLoadedRelationship(name) && obj.hasRelationship(name)
}