* Make a map and return a function for checking if a key * is in that map.
( str, expectsLowerCase )
| 30 | * is in that map. |
| 31 | */ |
| 32 | function makeMap ( |
| 33 | str, |
| 34 | expectsLowerCase |
| 35 | ) { |
| 36 | var map = Object.create(null); |
| 37 | var list = str.split(','); |
| 38 | for (var i = 0; i < list.length; i++) { |
| 39 | map[list[i]] = true; |
| 40 | } |
| 41 | return expectsLowerCase |
| 42 | ? function (val) { return map[val.toLowerCase()]; } |
| 43 | : function (val) { return map[val]; } |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Check if a tag is a built-in tag. |
no outgoing calls
no test coverage detected