From e0e48b78b1118b3d068ddd74b4c66638cc32e3c5 Mon Sep 17 00:00:00 2001 From: Todd Pressley Date: Thu, 3 Jun 2021 21:48:53 -0400 Subject: [PATCH] Correct minor typo Replace "mathc" argument with "match" in camelize's replacer function --- lib/string.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);