Browse Source
because __proto__ has magic and __PROTO__ doesn't + comments for the rest of ':' stuffpull/14/head
Alex Kocharin
10 years ago
5 changed files with 9 additions and 4 deletions
@ -1,5 +1,8 @@ |
|||
'use strict'; |
|||
|
|||
module.exports = function normalizeReference(str) { |
|||
return str.trim().replace(/\s+/g, ' ').toLowerCase(); |
|||
// use .toUpperCase() instead of .toLowerCase()
|
|||
// here to avoid a conflict with Object.prototype
|
|||
// members (most notably, `__proto__`)
|
|||
return str.trim().replace(/\s+/g, ' ').toUpperCase(); |
|||
}; |
|||
|
Loading…
Reference in new issue