function makeMap ( str, expectsLowerCase ) { var map = Object.create(null); console.log(map) var list = str.split(','); for (var i = 0; i < list.length; i++) { map[list[i]] = true; } console.log(map) return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; } } /** * Check if a attribute is a reserved attribute. */ var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');