Skip to content

Instantly share code, notes, and snippets.

@vontell
Created January 16, 2018 20:22
Show Gist options
  • Save vontell/cd7a2aeeb4459397eba9437098e3e928 to your computer and use it in GitHub Desktop.
Save vontell/cd7a2aeeb4459397eba9437098e3e928 to your computer and use it in GitHub Desktop.
001 Remove Record
/**
* Deletes the shortened URL record associated with the given shortenedURL,
* returning the short URL word used back to the word pool.
* shortenedURL - A shortened URL generated by this program instance
*/
function removeShortenedURL(shortenedURL) {
var word = shortenedURL.replace(baseDomain, "");
delete urlDictionary[word];
words.push(word);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment