scripts/action-table-maker.js
function addActionHandler(path, actionMap, filePath) {

  const {init} = path.node;

  if (init && Array.isArray(init.properties)) {
    init.properties.forEach(property => {
      const {key, value} = property;
      if (key && value && key.property && value.property) {
        const actionType = key.property.name;
        const updater = value.name;

        actionMap[actionType] = actionMap[actionType] || createActionNode(actionType);
        actionMap[actionType].updaters.push({
          updater: value.object.name,
          name: value.property.name,
          path: filePath
        });
      }
    })
  }
}
function addActionHandler(path, actionMap, filePath) {

  const {init} = path.node;

  if (init && Array.isArray(init.properties)) {
    init.properties.forEach(property => {
      const {key, value} = property;
      if (key && value && key.property && value.property) {
        const actionType = key.property.name;
        const updater = value.name;

        actionMap[actionType] = actionMap[actionType] || createActionNode(actionType);
        actionMap[actionType].updaters.push({
          updater: value.object.name,
          name: value.property.name,
          path: filePath
        });
      }
    })
  }
}
function addActionHandler ( path , actionMap , filePath ) { const { init } = path . node ; if ( init && Array . isArray ( init . properties ) ) { init . properties . forEach ( property => { const { key , value } = property ; if ( key && value && key . property && value . property ) { const actionType = key . property . name ; const updater = value . name ; actionMap [ actionType ] = actionMap [ actionType ] || createActionNode ( actionType ) ; actionMap [ actionType ] . updaters . push ( { updater : value . object . name , name : value . property . name , path : filePath } ) ; } } ) } }
Parse actionHandler declaration to map updater to action type
@param {Object} path - AST node
@param {Object} actionMap
@param {string} filePath
Parse actionHandler declaration to map updater to action type