lib/assets/javascripts/extensions.coffee in material_raingular-0.0.3.6 vs lib/assets/javascripts/extensions.coffee in material_raingular-0.0.3.7

- old
+ new

@@ -36,10 +36,10 @@ Array.prototype.includes = (entry)-> this.indexOf(entry) > -1 Array.prototype.drop = (entry)-> this.splice(this.indexOf(entry),1) String.prototype.titleize = -> - return this.replace(/\_/g,' ').replace(/\b[a-z]/g, (letter)-> + return this.replace(/\_/g,' ').replace(/([A-Z])/g, ' $1').trim().replace(/\b[a-z]/g, (letter)-> return letter[0].toUpperCase()) Array.prototype.pluck = (property) -> return [] if !(this && property) property = String(property) return this.map (object) ->