MCPcopy
hub / github.com/HumanSignal/label-studio / makeMap

Function makeMap

docs/themes/htx/source/js/vue.js:108–121  ·  view source on GitHub ↗

* Make a map and return a function for checking if a key * is in that map.

(str, expectsLowerCase)

Source from the content-addressed store, hash-verified

106 * is in that map.
107 */
108 function makeMap(str, expectsLowerCase) {
109 var map = Object.create(null);
110 var list = str.split(",");
111 for (var i = 0; i < list.length; i++) {
112 map[list[i]] = true;
113 }
114 return expectsLowerCase
115 ? function(val) {
116 return map[val.toLowerCase()];
117 }
118 : function(val) {
119 return map[val];
120 };
121 }
122
123 /**
124 * Check if a tag is a built-in tag.

Callers 3

vue.jsFile · 0.85
createPatchFunctionFunction · 0.85
genStaticKeys$1Function · 0.85

Calls 1

createMethod · 0.45

Tested by

no test coverage detected