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