MCPcopy Create free account
hub / github.com/zxlie/FeHelper / createStorageSeed

Function createStorageSeed

test/background-menu.test.js:8–20  ·  view source on GitHub ↗
(toolNames = MENU_TOOL_NAMES)

Source from the content-addressed store, hash-verified

6const MENU_TOOL_NAMES = Object.keys(toolMap);
7
8function createStorageSeed(toolNames = MENU_TOOL_NAMES) {
9 const seed = {
10 'DYNAMIC_MENU:download-crx': '0',
11 'DYNAMIC_MENU:fehelper-setting': '0'
12 };
13
14 toolNames.forEach((toolName, index) => {
15 seed[`DYNAMIC_TOOL:${toolName}`] = String(index + 1);
16 seed[`DYNAMIC_MENU:${toolName}`] = '1';
17 });
18
19 return seed;
20}
21
22function createChromeMock(storageSeed = createStorageSeed()) {
23 const createdMenus = [];

Callers 2

createChromeMockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected