angular/angular.js — pull request #4093 by just-boris (2013-09-21 09:09:26+00:00)
Title: chore(angular.toJson): use charAt instead of regexp

Regular Expressions is an expensive operation and this case can be simplified. Here's a comparison: http://jsperf.com/check-first-char
Using charAt is better than using brackets, explanation of this can be found here http://stackoverflow.com/questions/5943726/string-charatx-or-stringx/5943760#5943760