MCPcopy Index your code
hub / github.com/css/csso / buildMap

Function buildMap

lib/usage.js:3–19  ·  view source on GitHub ↗
(list, caseInsensitive)

Source from the content-addressed store, hash-verified

1const { hasOwnProperty } = Object.prototype;
2
3function buildMap(list, caseInsensitive) {
4 const map = Object.create(null);
5
6 if (!Array.isArray(list)) {
7 return null;
8 }
9
10 for (let name of list) {
11 if (caseInsensitive) {
12 name = name.toLowerCase();
13 }
14
15 map[name] = true;
16 }
17
18 return map;
19}
20
21function buildList(data) {
22 if (!data) {

Callers 1

buildListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…