MCPcopy Create free account
hub / github.com/uiwjs/react-codemirror / includes

Function includes

themes/_scripts/main.mjs:6–11  ·  view source on GitHub ↗
(data, ...arg)

Source from the content-addressed store, hash-verified

4const require = createRequire(import.meta.url);
5
6const includes = (data, ...arg) => {
7 const isComma = typeof data.scope === 'string' && data.scope.includes(',');
8 const scope = typeof data.scope === 'string' ? data.scope.split(isComma ? ',' : ' ').filter(Boolean).map(t => t.trim()) : data.scope || [];
9 const isInclude = !![scope||[]].flat().find(elm => arg.includes(elm));
10 return isInclude ? getForeground(data.settings.foreground) : undefined;
11}
12const getForeground = (str) => typeof str === 'string' ? str : null;
13
14function format(data = {}, dark = false) {

Callers 1

formatFunction · 0.85

Calls 1

getForegroundFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…