MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / normalizeExtensions

Function normalizeExtensions

src/cm/themes/index.js:48–59  ·  view source on GitHub ↗
(value, target = [])

Source from the content-addressed store, hash-verified

46const warnedInvalidThemes = new Set();
47
48function normalizeExtensions(value, target = []) {
49 if (Array.isArray(value)) {
50 value.forEach((item) => normalizeExtensions(item, target));
51 return target;
52 }
53
54 if (value !== null && value !== undefined) {
55 target.push(value);
56 }
57
58 return target;
59}
60
61function toExtensionGetter(getExtension) {
62 if (typeof getExtension === "function") {

Callers 3

toExtensionGetterFunction · 0.85
getThemeExtensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected