MCPcopy Create free account
hub / github.com/TruthHun/BookStack / makeMap

Function makeMap

static/vuejs/vue.runtime.common.js:34–46  ·  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

32 * is in that map.
33 */
34function 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.

Callers 2

createPatchFunctionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected