6 prefixMatch =
new RegExp(/(?!xmlns)^.*:/);
8 exports.normalize =
function(str) {
9 return str.toLowerCase();
12 exports.firstCharLowerCase =
function(str) {
13 return str.charAt(0).toLowerCase() + str.slice(1);
16 exports.stripPrefix =
function(str) {
17 return str.replace(prefixMatch,
'');
20 exports.parseNumbers =
function(str) {
22 str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);
27 exports.parseBooleans =
function(str) {
28 if (/^(?:
true|
false)$/i.test(str)) {
29 str = str.toLowerCase() ===
'true';