You are viewing a single comment's thread from:

RE: Building A Content Management System Using The MEAN Stack - 1 (Create Server, Config File and Helper Modules)

in #utopian-io6 years ago

Thank you for your contribution.

  • Please format your code better, if the code is indented it will be easier to read. For example:
module.exports = slugify;

//convert string into slug
function slugify(input) {
  if (!input)
  return;
  
  //make lower case and trim
  var  slug = input.toLowerCase().trim();
  
  //replace invalid chars with spaces
  slug = slug.replace(/[^a-z0-9\s-]/g, ' ');
  
  //replace multiple spaces or hyphens with a single hyphen
  slug = slug.replace(/[\s-]+/g, '-');
  return slug;
};



Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Sort:  

Thank you for your review, @portugalcoin!

So far this week you've reviewed 16 contributions. Keep up the good work!

I'll work on that, thanks

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70733.96
ETH 3563.16
USDT 1.00
SBD 4.76