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