Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const login = 'sdwvit';
const type = {
feat: 'feature',
chore: 'chore',
main: 'maintenance',
fix: 'fix'
};
const pages = {
land: 'landing',
res: 'results',
home: 'home',
ch: 'checkout'
};
function getName(ticketName) {
const explanation = ticketName.toLowerCase().replace(/[^\w]/g, '-');
return `${login}/${type.feat}/${pages.res}/${explanation}`;
}
window.alert(getName(window.prompt('Ticket name?')));
// minified via https://jscompress.com:
// javascript:const login="sdwvit",type={feat:"feature",chore:"chore",main:"maintenance",fix:"fix"},pages={land:"landing",res:"results",home:"home",ch:"checkout"};function getName(a){const b=a.toLowerCase().replace(/[^\w]/g,"-");return`${login}/${type.feat}/${pages.res}/${b}`}window.alert(getName(window.prompt("Ticket name?")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.