Javascript Titleize function

1
2
'use strict';
String.prototype.capitalize = function() {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
A port of rails String#titleize function, can probably be helpful in your node.js applications :)

1 Response

It's not a complete port, you forgot to convert underscores to spaces

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.