Here you can find the source of spacify(str)
function spacify(str) { return str.split('').join(' '); }
String.prototype.spacify = function () { return this.split('').join(" "); };
var spacifyForLoop = function(input) { var word2 = ''; for (var i = 0, max = input.length; i < max; i++) { word2 += input[i] + ' '; return word2; var spacifyNative = function(input) { return input.split('').join(' '); ...
String.prototype.spacify = function() { var sentence = this.replace(/__/g, '-').replace(/_/g, ' '); if (sentence.match(/\s/) && !sentence.match(/\-/)) { var words = sentence.split(' '); for (i in words) { words[i] = words[i][0].toUpperCase() + words[i].substr(1); sentence = words.join(' '); return sentence.replace(/\-/g, '_');
String.prototype.spacify = function () { return this.split('') .filter(e => e !== ' ') .join(' '); };
String.prototype.spacify = function() { return this.replace(/([0-9])([a-z])/, '$1 $2'); };