Vitaly Puzrin
10 years ago
5 changed files with 27 additions and 28 deletions
@ -1,11 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
|
|
||||
// Hepler to [reference labels]. No better place for this code :)
|
|
||||
// It's only for refs/links and should not be exported anywhere.
|
|
||||
module.exports = function normalizeReference(str) { |
|
||||
// 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