Skip to content

Instantly share code, notes, and snippets.

@SilencerWeb
Created June 21, 2019 06:12
Show Gist options
  • Save SilencerWeb/dc024cf41870af44efa1cbf6662c2ca4 to your computer and use it in GitHub Desktop.
Save SilencerWeb/dc024cf41870af44efa1cbf6662c2ca4 to your computer and use it in GitHub Desktop.
const ACTION_NAMES = {
approve_post: {
regexp: /a_p_(.+)/,
string: 'a_p'
},
dismiss_post: {
regexp: /d_p_(.+)/,
string: 'd_p'
},
approve_post_confirmation: {
regexp: /a_p_c_(.+)/,
string: 'a_p_c'
},
dismiss_post_confirmation: {
regexp: /d_p_c_(.+)/,
string: 'd_p_c'
},
approve_post_rejection: {
regexp: /a_p_r_(.+)/,
string: 'a_p_r'
},
dismiss_post_rejection: {
regexp: /d_p_r_(.+)/,
string: 'd_p_r'
},
remove_post_caption: {
regexp: /remove_post_caption_(.+)/,
string: 'remove_post_caption'
},
return_post_caption: {
regexp: /return_post_caption_(.+)/,
string: 'return_post_caption'
},
};
module.exports = { ACTION_NAMES };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment