(unit, shorthand)
| 1937 | var aliases = {}; |
| 1938 | |
| 1939 | function addUnitAlias (unit, shorthand) { |
| 1940 | var lowerCase = unit.toLowerCase(); |
| 1941 | aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; |
| 1942 | } |
| 1943 | |
| 1944 | function normalizeUnits(units) { |
| 1945 | return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; |