src/components/build-component.js
/**
 * Strips out the extraneous properties we have in our
 * props definitions
 * @param {Object} props
 */
Strips out the extraneous properties we have in our
props definitions
@param {Object} props
Strips out the extraneous properties we have in our props definitions @param { Object } props
function mappedPropsToVueProps(mappedProps) {
  return Object.entries(mappedProps)
    .map(([key, prop]) => {
      const value = {}
      if ('type' in prop) value.type = prop.type
      if ('default' in prop) value.default = prop.default
      if ('required' in prop) value.required = prop.required
      return [key, value]
    })
    .reduce((acc, [key, val]) => {
      acc[key] = val
      return acc
    }, {})
}
function mappedPropsToVueProps ( mappedProps ) { return Object . entries ( mappedProps ) . map ( ( [ key , prop ] ) => { const value = { } if ( 'type' in prop ) value . type = prop . type if ( 'default' in prop ) value . default = prop . default if ( 'required' in prop ) value . required = prop . required return [ key , value ] } ) . reduce ( ( acc , [ key , val ] ) => { acc [ key ] = val return acc } , { } ) }
Strips out the extraneous properties we have in our
 props definitions
 @param {Object} props
Strips out the extraneous properties we have in our props definitions @param { Object } props