From df0d1b57a01b29a5d4ac0ccf0c05c42b2eb0ba52 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 10 Mar 2014 23:57:24 -0700 Subject: [PATCH] Fix `_.camelCase` with consecutive capitalized words. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index a35ce8e64..36f1a9144 100644 --- a/lodash.js +++ b/lodash.js @@ -77,7 +77,7 @@ var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; /** Used to match words to create compound words */ - var reWords = /[a-zA-Z0-9][a-z0-9]*/g; + var reWords = /[A-Z]{2,}|[a-zA-Z0-9][a-z0-9]*/g; /** Used to detect and test whitespace */ var whitespace = (