Skip to content

Instantly share code, notes, and snippets.

@datvtwkm
Created August 21, 2018 13:20
Show Gist options
  • Save datvtwkm/fa45a55e38b965aa5f8c63ce7f8b3f21 to your computer and use it in GitHub Desktop.
Save datvtwkm/fa45a55e38b965aa5f8c63ce7f8b3f21 to your computer and use it in GitHub Desktop.
const process = (type, value) => {
switch(type){
case 'username': return value.trim();
case 'password': return value.substring(0, 6);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment