diff --git a/lib/string.js b/lib/string.js index 826afd0..d89b3f3 100644 --- a/lib/string.js +++ b/lib/string.js @@ -76,7 +76,7 @@ string.js - Copyright (C) 2012-2014, JP Richardson //# modified slightly from https://github.com/epeli/underscore.string camelize: function() { - var s = this.trim().s.replace(/(\-|_|\s)+(.)?/g, function(mathc, sep, c) { + var s = this.trim().s.replace(/(\-|_|\s)+(.)?/g, function(match, sep, c) { return (c ? c.toUpperCase() : ''); }); return new this.constructor(s);