All files / addon/utils prop-definition-tools.js

100% Statements 10/10
66.67% Branches 4/6
100% Functions 2/2
100% Lines 10/10

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 10 11 12 13 14 15 16 17 18 19 20  37x 37x 264x 264x     37x       180x 180x 1699x 1699x     180x    
export function BuilderForPropTypes(propDefinitions) {
  let types = {};
  for (var key in propDefinitions) {
    Eif (propDefinitions.hasOwnProperty(key)) {
      types[key] = propDefinitions[key].type
    }
  }
  return types;
}
 
export function BuilderForPropDefaults(propDefinitions) {
  let defaults = {};
  for (var key in propDefinitions) {
    Eif (propDefinitions.hasOwnProperty(key) && typeof(propDefinitions[key].default) !== undefined) {
      defaults[key] = propDefinitions[key].default
    }
  }
  return defaults;
}