src/dispatcher.js
function getProperty (service, resource, action, propertySpec) {
  const parts = propertySpec.split('.')
  var target
  switch (parts[ 0 ]) {
    case 'action':
      target = action
      break
    case 'resource':
      target = resource
      break
    default:
      target = service
  }
  const property = parts[ 1 ]
  return { key: property, value: target ? target[ property ] : null }
}
function getProperty (service, resource, action, propertySpec) {
  const parts = propertySpec.split('.')
  var target
  switch (parts[ 0 ]) {
    case 'action':
      target = action
      break
    case 'resource':
      target = resource
      break
    default:
      target = service
  }
  const property = parts[ 1 ]
  return { key: property, value: target ? target[ property ] : null }
}
function getProperty ( service , resource , action , propertySpec ) { const parts = propertySpec . split ( '.' ) var target switch ( parts [ 0 ] ) { case 'action' : target = action break case 'resource' : target = resource break default : target = service } const property = parts [ 1 ] return { key : property , value : target ? target [ property ] : null } }
given a property specifier "service|resource|action.propertyName" find the property value
given a property specifier service|resource|action . propertyName find the property value